Changeset 32329 in osm for applications/editors/josm/plugins/piclayer/src/org
- Timestamp:
- 2016-06-19T16:08:56+02:00 (9 years ago)
- Location:
- applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/PicLayerPlugin.java
r31729 r32329 158 158 new SavePictureCalibrationAction((PicLayerAbstract) arg0).actionPerformed(null); 159 159 } 160 // Why should I do all these checks now? 161 boolean enable = Main.map != null && Main.map.mapView != null && Main.map.mapView.getAllLayers() != null && Main.map.mapView.getAllLayers().size() != 0; 160 boolean enable = !Main.getLayerManager().getLayers().isEmpty(); 162 161 newLayerFromFileAction.setEnabled(enable); 163 162 newLayerFromClipboardAction.setEnabled(enable); -
applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/GenericPicTransformAction.java
r30356 r32329 57 57 public void mousePressed(MouseEvent e) { 58 58 // Start action 59 if ( Main. map.mapView.getActiveLayer() instanceof PicLayerAbstract ) {60 currentLayer = (PicLayerAbstract)Main. map.mapView.getActiveLayer();59 if ( Main.getLayerManager().getActiveLayer() instanceof PicLayerAbstract ) { 60 currentLayer = (PicLayerAbstract)Main.getLayerManager().getActiveLayer(); 61 61 62 62 if ( currentLayer != null && e.getButton() == MouseEvent.BUTTON1 ) { … … 99 99 100 100 protected void updateDrawPoints(boolean value) { 101 Layer active = Main. map.mapView.getActiveLayer();101 Layer active = Main.getLayerManager().getActiveLayer(); 102 102 if (active instanceof PicLayerAbstract) { 103 103 ((PicLayerAbstract)active).setDrawPoints(value); -
applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/actions/newlayer/NewLayerFromFileAction.java
r31729 r32329 119 119 // or at the bottom of the stack if there is no such layer yet 120 120 // The next layers we load will be placed one after the other after this first layer 121 int newLayerPos = Main. map.mapView.getAllLayers().size();122 for(Layer l : Main. map.mapView.getLayersOfType(PicLayerAbstract.class)) {121 int newLayerPos = Main.getLayerManager().getLayers().size(); 122 for(Layer l : Main.getLayerManager().getLayersOfType(PicLayerAbstract.class)) { 123 123 int pos = Main.map.mapView.getLayerPos(l); 124 124 if (pos < newLayerPos) newLayerPos = pos;
Note:
See TracChangeset
for help on using the changeset viewer.