Changeset 33226 in osm for applications/editors/josm/plugins/cadastre-fr/src
- Timestamp:
- 2017-04-12T00:46:52+02:00 (8 years ago)
- Location:
- applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/Address.java
r32950 r33226 56 56 import org.openstreetmap.josm.data.osm.Way; 57 57 import org.openstreetmap.josm.data.osm.WaySegment; 58 import org.openstreetmap.josm.gui.MapFrame;59 58 import org.openstreetmap.josm.gui.MapView; 60 59 import org.openstreetmap.josm.tools.GBC; … … 91 90 private boolean ctrl; 92 91 93 public Address(MapFrame mapFrame) { 92 /** 93 * Constructs a new {@code Address} map mode. 94 */ 95 public Address() { 94 96 super(tr("Add address"), "buildings", 95 97 tr("Helping tool for tag address"), … … 97 99 Shortcut.registerShortcut("mapmode:cadastre-fr-buildings", tr("Mode: {0}", tr("CadastreFR - Buildings")), KeyEvent.VK_E, Shortcut.DIRECT), 98 100 // CHECKSTYLE.ON: LineLength 99 mapFrame,getCursor());101 getCursor()); 100 102 } 101 103 … … 114 116 Main.map.mapView.removeMouseListener(this); 115 117 } 116 // dialog.setVisible(false);117 118 // kill the window completely to fix an issue on some linux distro and full screen mode. 118 119 if (dialog != null) { … … 510 511 @Override 511 512 public void windowClosing(WindowEvent arg) { 512 exitMode(); 513 if (Boolean.TRUE.equals(getValue("active"))) { 514 exitMode(); 515 } 513 516 Main.map.selectMapMode((MapMode) Main.map.getDefaultButtonAction()); 514 517 } -
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastrePlugin.java
r33047 r33226 376 376 if (oldFrame == null && newFrame != null) { 377 377 setEnabledAll(true); 378 Main.map.addMapMode(new IconToggleButton(new WMSAdjustAction( Main.map)));379 Main.map.addMapMode(new IconToggleButton(new Address( Main.map)));378 Main.map.addMapMode(new IconToggleButton(new WMSAdjustAction())); 379 Main.map.addMapMode(new IconToggleButton(new Address())); 380 380 } else if (oldFrame != null && newFrame == null) { 381 381 setEnabledAll(false); -
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSAdjustAction.java
r32556 r33226 18 18 import org.openstreetmap.josm.actions.mapmode.MapMode; 19 19 import org.openstreetmap.josm.data.coor.EastNorth; 20 import org.openstreetmap.josm.gui.MapFrame;21 20 import org.openstreetmap.josm.gui.MapView; 22 21 import org.openstreetmap.josm.tools.ImageProvider; … … 34 33 private static EastNorth[] croppedRaster = new EastNorth[5];; 35 34 36 public WMSAdjustAction(MapFrame mapFrame) { 35 /** 36 * Constructs a new {@code WMSAdjustAction} map mode. 37 */ 38 public WMSAdjustAction() { 37 39 super(tr("Adjust WMS"), "adjustxywms", 38 tr("Adjust the position of the WMS layer (saved for raster images only)"), mapFrame,40 tr("Adjust the position of the WMS layer (saved for raster images only)"), 39 41 ImageProvider.getCursor("normal", "move")); 40 42 } … … 50 52 modifiedLayer.adjustModeEnabled = true; 51 53 } else { 52 // JOptionPane.showMessageDialog(Main.parent,tr("This mode works only if active layer is\n" 53 // +"a cadastre layer")); 54 exitMode(); 54 // This mode works only if active layer is a cadastre layer 55 if (Boolean.TRUE.equals(getValue("active"))) { 56 exitMode(); 57 } 55 58 Main.map.selectMapMode((MapMode) Main.map.getDefaultButtonAction()); 56 59 }
Note:
See TracChangeset
for help on using the changeset viewer.