Changeset 13142 in josm for trunk/src


Ignore:
Timestamp:
2017-11-22T01:49:53+01:00 (7 years ago)
Author:
Don-vip
Message:

fix #14082 - Remove coordinates from nodes in validator and selection dialogs by default (new option like objects ids to display them)

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

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/DefaultNameFormatter.java

    r12846 r13142  
    186186                preset.nameTemplate.appendText(name, node);
    187187            }
    188             if (node.getCoor() != null) {
    189                 name.append(" \u200E(").append(CoordinateFormatManager.getDefaultFormat().latToString(node)).append(", ")
     188            if (node.isLatLonKnown() && Config.getPref().getBoolean("osm-primitives.showcoor")) {
     189                name.append(" \u200E(")
     190                    .append(CoordinateFormatManager.getDefaultFormat().latToString(node)).append(", ")
    190191                    .append(CoordinateFormatManager.getDefaultFormat().lonToString(node)).append(')');
    191192            }
    192193        }
    193194        decorateNameWithId(name, node);
    194 
    195195
    196196        String result = name.toString();
  • trunk/src/org/openstreetmap/josm/gui/preferences/display/LafPreference.java

    r12846 r13142  
    8282    private final JCheckBox showSplashScreen = new JCheckBox(tr("Show splash screen at startup"));
    8383    private final JCheckBox showID = new JCheckBox(tr("Show object ID in selection lists"));
     84    private final JCheckBox showCoor = new JCheckBox(tr("Show node coordinates in selection lists"));
    8485    private final JCheckBox showLocalizedName = new JCheckBox(tr("Show localized name in selection lists"));
    8586    private final JCheckBox modeless = new JCheckBox(tr("Modeless working (Potlatch style)"));
     
    132133        showID.setSelected(Config.getPref().getBoolean("osm-primitives.showid", false));
    133134
     135        // Show Coordinates in selection
     136        showCoor.setToolTipText(tr("Show node coordinates in selection lists"));
     137        showCoor.setSelected(Config.getPref().getBoolean("osm-primitives.showcoor", false));
     138
    134139        // Show localized names
    135140        showLocalizedName.setToolTipText(tr("Show localized name in selection lists, if available"));
     
    142147
    143148        panel.add(showID, GBC.eop().insets(20, 0, 0, 0));
     149        panel.add(showCoor, GBC.eop().insets(20, 0, 0, 0));
    144150        panel.add(showLocalizedName, GBC.eop().insets(20, 0, 0, 0));
    145151        panel.add(modeless, GBC.eop().insets(20, 0, 0, 0));
     
    205211        Config.getPref().putBoolean("draw.splashscreen", showSplashScreen.isSelected());
    206212        Config.getPref().putBoolean("osm-primitives.showid", showID.isSelected());
     213        Config.getPref().putBoolean("osm-primitives.showcoor", showCoor.isSelected());
    207214        Config.getPref().putBoolean("osm-primitives.localize-name", showLocalizedName.isSelected());
    208215        MapFrame.MODELESS.put(modeless.isSelected());
Note: See TracChangeset for help on using the changeset viewer.