Ignore:
Timestamp:
2017-08-27T17:29:32+02:00 (7 years ago)
Author:
Don-vip
Message:

see #15182 - move PROP_SYSTEM_OF_MEASUREMENT from gui.preferences.ProjectionPreferences to data.SystemOfMeasurment

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

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/MapStatus.java

    r12663 r12674  
    7171import org.openstreetmap.josm.data.preferences.DoubleProperty;
    7272import org.openstreetmap.josm.gui.help.Helpful;
    73 import org.openstreetmap.josm.gui.preferences.projection.ProjectionPreference;
    7473import org.openstreetmap.josm.gui.progress.PleaseWaitProgressMonitor;
    7574import org.openstreetmap.josm.gui.progress.PleaseWaitProgressMonitor.ProgressMonitorDialog;
     
    807806                    Component invoker = ((JPopupMenu) e.getSource()).getInvoker();
    808807                    jumpButton.setVisible(latText.equals(invoker) || lonText.equals(invoker));
    809                     String currentSOM = ProjectionPreference.PROP_SYSTEM_OF_MEASUREMENT.get();
     808                    String currentSOM = SystemOfMeasurement.PROP_SYSTEM_OF_MEASUREMENT.get();
    810809                    for (JMenuItem item : somItems) {
    811810                        item.setSelected(item.getText().equals(currentSOM));
     
    919918                public void mouseClicked(MouseEvent e) {
    920919                    if (!e.isPopupTrigger() && e.getButton() == MouseEvent.BUTTON1) {
    921                         String som = ProjectionPreference.PROP_SYSTEM_OF_MEASUREMENT.get();
     920                        String som = SystemOfMeasurement.PROP_SYSTEM_OF_MEASUREMENT.get();
    922921                        String newsom = soms.get((soms.indexOf(som)+1) % soms.size());
    923922                        updateSystemOfMeasurement(newsom);
  • trunk/src/org/openstreetmap/josm/gui/preferences/projection/ProjectionPreference.java

    r12486 r12674  
    273273
    274274    private static String projectionChoice;
    275    
     275
    276276    private static final StringProperty PROP_PROJECTION_DEFAULT = new StringProperty("projection.default", mercator.getId());
    277277    private static final StringProperty PROP_COORDINATES = new StringProperty("coordinates", null);
    278278    private static final CollectionProperty PROP_SUB_PROJECTION_DEFAULT = new CollectionProperty("projection.default.sub", null);
    279     public static final StringProperty PROP_SYSTEM_OF_MEASUREMENT = new StringProperty("system_of_measurement", "Metric");
    280279    private static final String[] unitsValues = ALL_SYSTEMS.keySet().toArray(new String[ALL_SYSTEMS.size()]);
    281280    private static final String[] unitsValuesTr = new String[unitsValues.length];
     
    339338
    340339        for (int i = 0; i < unitsValues.length; ++i) {
    341             if (unitsValues[i].equals(PROP_SYSTEM_OF_MEASUREMENT.get())) {
     340            if (unitsValues[i].equals(SystemOfMeasurement.PROP_SYSTEM_OF_MEASUREMENT.get())) {
    342341                unitsCombo.setSelectedIndex(i);
    343342                break;
Note: See TracChangeset for help on using the changeset viewer.