Changeset 4767 in josm for trunk


Ignore:
Timestamp:
2012-01-07T18:56:52+01:00 (13 years ago)
Author:
akks
Message:

Option "Highlight target ways and nodes" in preferences, see #7190

Location:
trunk/src/org/openstreetmap/josm
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java

    r4617 r4767  
    165165        initialMoveDelay = Main.pref.getInteger("edit.initial-move-delay", 200);
    166166        initialMoveThreshold = Main.pref.getInteger("edit.initial-move-threshold", 5);
    167         drawTargetHighlight = Main.pref.getBoolean("draw.target-highlight", true);
    168167    }
    169168
     
    175174        mv.setVirtualNodesEnabled(
    176175                Main.pref.getInteger("mappaint.node.virtual-size", 8) != 0);
     176        drawTargetHighlight = Main.pref.getBoolean("draw.target-highlight", true);
    177177        // This is required to update the cursors when ctrl/shift/alt is pressed
    178178        try {
  • trunk/src/org/openstreetmap/josm/gui/preferences/DrawingPreference.java

    r4287 r4767  
    1212import javax.swing.Box;
    1313import javax.swing.JCheckBox;
     14import javax.swing.JLabel;
    1415import javax.swing.JPanel;
    1516import javax.swing.JScrollPane;
     
    3435    private JCheckBox virtualNodes = new JCheckBox(tr("Draw virtual nodes in select mode"));
    3536    private JCheckBox inactive = new JCheckBox(tr("Draw inactive layers in other color"));
     37
     38    // Options that affect performance
     39    private JCheckBox useHighlighting = new JCheckBox(tr("Highlight target ways and nodes"));
     40    private JCheckBox drawHelperLine = new JCheckBox(tr("Draw rubber-band helper line"));
    3641    private JCheckBox useAntialiasing = new JCheckBox(tr("Smooth map graphics (antialiasing)"));
    3742    private JCheckBox outlineOnly = new JCheckBox(tr("Draw only outlines of areas"));
    38 
     43   
    3944    public void addGui(PreferenceTabbedPane gui) {
    4045        gui.display.setPreferredSize(new Dimension(400,600));
     
    8085        panel.add(segmentOrderNumber, GBC.eop().insets(20,0,0,0));
    8186
    82         // antialiasing
    83         useAntialiasing.setToolTipText(tr("Apply antialiasing to the map view resulting in a smoother appearance."));
    84         useAntialiasing.setSelected(Main.pref.getBoolean("mappaint.use-antialiasing", true));
    85         panel.add(useAntialiasing, GBC.eop().insets(20,0,0,0));
    86 
    8787        // downloaded area
    8888        sourceBounds.setToolTipText(tr("Draw the boundaries of data loaded from the server."));
     
    100100        panel.add(inactive, GBC.eop().insets(20,0,0,0));
    101101
     102        // antialiasing
     103        useAntialiasing.setToolTipText(tr("Apply antialiasing to the map view resulting in a smoother appearance."));
     104        useAntialiasing.setSelected(Main.pref.getBoolean("mappaint.use-antialiasing", true));
     105
     106        // highlighting
     107        useHighlighting.setToolTipText(tr("Hightlight target nodes and ways while drawing or selecting"));
     108        useHighlighting.setSelected(Main.pref.getBoolean("draw.target-highlight", true));
     109
     110        drawHelperLine.setToolTipText(tr("Draw rubber-band helper line"));
     111        drawHelperLine.setSelected(Main.pref.getBoolean("draw.helper-line", true));
     112        panel.add(drawHelperLine, GBC.eop().insets(20, 0, 0, 0));
     113
    102114        // outlineOnly
    103115        outlineOnly.setSelected(Main.pref.getBoolean("draw.data.area_outline_only", false));
    104116        outlineOnly.setToolTipText(tr("This option suppresses the filling of areas, overriding anything specified in the selected style."));
    105         panel.add(outlineOnly, GBC.eol().insets(20,0,0,5));
    106117
     118        if (Main.pref.getBoolean("expert", false)) {
     119            panel.add(new JLabel(tr("Options that affect drawing performance")),GBC.eop().insets(5,10,0,0));
     120            panel.add(useAntialiasing, GBC.eop().insets(20,5,0,0));
     121            panel.add(useHighlighting, GBC.eop().insets(20,0,0,0));
     122            panel.add(outlineOnly, GBC.eol().insets(20,0,0,5));
     123        }
     124       
    107125        panel.add(Box.createVerticalGlue(), GBC.eol().fill(GBC.BOTH));
    108126        scrollpane = new JScrollPane(panel);
     
    121139        Main.pref.put("draw.data.inactive_color", inactive.isSelected());
    122140        Main.pref.put("mappaint.use-antialiasing", useAntialiasing.isSelected());
     141        Main.pref.put("draw.target-highlight", useHighlighting.isSelected());
     142        Main.pref.put("draw.helper-line", drawHelperLine.isSelected());
    123143        int vn = Main.pref.getInteger("mappaint.node.virtual-size", 8);
    124144        if (virtualNodes.isSelected()) {
  • trunk/src/org/openstreetmap/josm/gui/preferences/LafPreference.java

    r4658 r4767  
    3939    private JCheckBox showID = new JCheckBox(tr("Show object ID in selection lists"));
    4040    private JCheckBox showLocalizedName = new JCheckBox(tr("Show localized name in selection lists"));
    41     private JCheckBox drawHelperLine = new JCheckBox(tr("Draw rubber-band helper line"));
    4241    private JCheckBox modeless = new JCheckBox(tr("Modeless working (Potlatch style)"));
    4342    private JCheckBox expert = new JCheckBox(tr("Expert mode"));
     
    9190        showLocalizedName.setSelected(Main.pref.getBoolean("osm-primitives.localize-name", true));
    9291
    93         drawHelperLine.setToolTipText(tr("Draw rubber-band helper line"));
    94         drawHelperLine.setSelected(Main.pref.getBoolean("draw.helper-line", true));
    9592
    9693        modeless.setToolTipText(tr("Do not require to switch modes (potlatch style workflow)"));
     
    10097            panel.add(showID, GBC.eop().insets(20, 0, 0, 0));
    10198            panel.add(showLocalizedName, GBC.eop().insets(20, 0, 0, 0));
    102             panel.add(drawHelperLine, GBC.eop().insets(20, 0, 0, 0));
    10399            panel.add(modeless, GBC.eop().insets(20, 0, 0, 0));
    104100        }
     
    128124        Main.pref.put("osm-primitives.showid", showID.isSelected());
    129125        Main.pref.put("osm-primitives.localize-name", showLocalizedName.isSelected());
    130         Main.pref.put("draw.helper-line", drawHelperLine.isSelected());
    131126        Main.pref.put("modeless", modeless.isSelected());
    132127        if(Main.pref.put("expert", expert.isSelected()))
Note: See TracChangeset for help on using the changeset viewer.