Changeset 14492 in josm


Ignore:
Timestamp:
2018-12-02T16:18:10+01:00 (4 months ago)
Author:
Don-vip
Message:

fix #16128 - add new GUI setting for mappaint.hide.labels.while.dragging

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/preferences/display/DrawingPreference.java

    r12846 r14492  
    1616import org.openstreetmap.josm.gui.autofilter.AutoFilterManager;
    1717import org.openstreetmap.josm.gui.autofilter.AutoFilterRule;
     18import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    1819import org.openstreetmap.josm.gui.preferences.PreferenceSetting;
    1920import org.openstreetmap.josm.gui.preferences.PreferenceSettingFactory;
     
    6263    private final JCheckBox useWireframeAntialiasing = new JCheckBox(tr("Smooth map graphics in wireframe mode (antialiasing)"));
    6364    private final JCheckBox outlineOnly = new JCheckBox(tr("Draw only outlines of areas"));
     65    private final JCheckBox hideLabelsWhileDragging = new JCheckBox(tr("Hide labels while dragging the map"));
    6466
    6567    @Override
     
    134136        outlineOnly.setSelected(Config.getPref().getBoolean("draw.data.area_outline_only", false));
    135137
     138        // hideLabelsWhileDragging
     139        hideLabelsWhileDragging.setToolTipText(tr("This option hides the textual labels of OSM objects while dragging the map."));
     140        hideLabelsWhileDragging.setSelected(OsmDataLayer.PROPERTY_HIDE_LABELS_WHILE_DRAGGING.get());
     141
    136142        // discardable keys
    137143        discardableKeys.setToolTipText(tr("Display keys which have been deemed uninteresting to the point that they can be silently removed."));
     
    168174        panel.add(useHighlighting, GBC.eop().insets(20, 0, 0, 0));
    169175        panel.add(outlineOnly, GBC.eol().insets(20, 0, 0, 0));
     176        panel.add(hideLabelsWhileDragging, GBC.eol().insets(20, 0, 0, 0));
    170177
    171178        panel.add(new JLabel(tr("Other options")),
     
    183190        ExpertToggleAction.addVisibilitySwitcher(useHighlighting);
    184191        ExpertToggleAction.addVisibilitySwitcher(outlineOnly);
     192        ExpertToggleAction.addVisibilitySwitcher(hideLabelsWhileDragging);
    185193        ExpertToggleAction.addVisibilitySwitcher(discardableKeys);
    186194
     
    195203    public boolean ok() {
    196204        boolean restart = gpxPanel.savePreferences();
     205        OsmDataLayer.PROPERTY_HIDE_LABELS_WHILE_DRAGGING.put(hideLabelsWhileDragging.isSelected());
    197206        Config.getPref().putBoolean("draw.data.area_outline_only", outlineOnly.isSelected());
    198207        Config.getPref().putBoolean("draw.segment.direction", directionHint.isSelected());
Note: See TracChangeset for help on using the changeset viewer.