Ignore:
Timestamp:
2014-06-09T14:05:46+02:00 (10 years ago)
Author:
akks
Message:

show advanced preferences of A and W modes before enrtering them

File:
1 edited

Legend:

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

    r7217 r7227  
    105105                "add_node_lock");
    106106        cursorImproveLock = ImageProvider.getCursor("crosshair", "lock");
    107 
     107        readPreferences();
    108108    }
    109109
     
    117117        }
    118118        super.enterMode();
    119 
     119        readPreferences();
     120
     121        mv = Main.map.mapView;
     122        mousePos = null;
     123        oldModeHelpText = "";
     124
     125        if (getCurrentDataSet() == null) {
     126            return;
     127        }
     128
     129        updateStateByCurrentSelection();
     130
     131        Main.map.mapView.addMouseListener(this);
     132        Main.map.mapView.addMouseMotionListener(this);
     133        Main.map.mapView.addTemporaryLayer(this);
     134        DataSet.addSelectionListener(this);
     135
     136        Main.map.keyDetector.addModifierListener(this);
     137    }
     138
     139    private void readPreferences() {
    120140        guideColor = Main.pref.getColor(marktr("improve way accuracy helper line"), null);
    121141        if (guideColor == null) guideColor = PaintColors.HIGHLIGHT.get();
     
    126146        deleteNodeStroke = GuiHelper.getCustomizedStroke(Main.pref.get("improvewayaccuracy.stroke.delete-node", "1"));
    127147        dotSize = Main.pref.getInteger("improvewayaccuracy.dot-size",6);
    128 
    129         mv = Main.map.mapView;
    130         mousePos = null;
    131         oldModeHelpText = "";
    132 
    133         if (getCurrentDataSet() == null) {
    134             return;
    135         }
    136 
    137         updateStateByCurrentSelection();
    138 
    139         Main.map.mapView.addMouseListener(this);
    140         Main.map.mapView.addMouseMotionListener(this);
    141         Main.map.mapView.addTemporaryLayer(this);
    142         DataSet.addSelectionListener(this);
    143 
    144         Main.map.keyDetector.addModifierListener(this);
    145148    }
    146149
Note: See TracChangeset for help on using the changeset viewer.