Changeset 35171 in osm
- Timestamp:
- 2019-10-04T23:18:59+02:00 (5 years ago)
- Location:
- applications/editors/josm/plugins/buildings_tools
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/buildings_tools/build.xml
r34968 r35171 2 2 <project name="buildings_tools" default="dist" basedir="."> 3 3 <!-- enter the SVN commit message --> 4 <property name="commit.message" value=" BuildingTools: Alt key to disable tags"/>4 <property name="commit.message" value="buildings_tools: add option to disable click+drag"/> 5 5 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 6 6 <property name="plugin.main.version" value="14960"/> -
applications/editors/josm/plugins/buildings_tools/src/org/openstreetmap/josm/plugins/buildings_tools/AdvancedSettingsDialog.java
r34572 r35171 19 19 private final JCheckBox cBigMode = new JCheckBox(tr("Big buildings mode")); 20 20 private final JCheckBox cSoftCur = new JCheckBox(tr("Rotate crosshair")); 21 private final JCheckBox cNoClickDrag = new JCheckBox(tr("Disable click+drag")); 21 22 22 23 public AdvancedSettingsDialog() { … … 32 33 panel.add(cBigMode, GBC.eol().fill(GBC.HORIZONTAL)); 33 34 panel.add(cSoftCur, GBC.eol().fill(GBC.HORIZONTAL)); 35 panel.add(cNoClickDrag, GBC.eol().fill(GBC.HORIZONTAL)); 34 36 35 37 cBigMode.setSelected(ToolSettings.isBBMode()); 36 38 cSoftCur.setSelected(ToolSettings.isSoftCursor()); 39 cNoClickDrag.setSelected(ToolSettings.isNoClickAndDrag()); 37 40 38 41 setupDialog(); … … 44 47 ToolSettings.setBBMode(cBigMode.isSelected()); 45 48 ToolSettings.setSoftCursor(cSoftCur.isSelected()); 49 ToolSettings.setNoClickAndDrag(cNoClickDrag.isSelected()); 46 50 } 47 51 } -
applications/editors/josm/plugins/buildings_tools/src/org/openstreetmap/josm/plugins/buildings_tools/DrawBuildingAction.java
r34968 r35171 369 369 return; 370 370 boolean dragged = true; 371 if (drawStartPos != null) 371 if (drawStartPos != null) { 372 372 dragged = e.getPoint().distance(drawStartPos) > 10; 373 drawStartPos = null; 373 drawStartPos = null; 374 if (ToolSettings.isNoClickAndDrag()) { 375 return; 376 } 377 } 374 378 375 379 if (mode == Mode.Drawing && !dragged) -
applications/editors/josm/plugins/buildings_tools/src/org/openstreetmap/josm/plugins/buildings_tools/ToolSettings.java
r34572 r35171 127 127 autoSelect = _autoSelect; 128 128 } 129 130 public static boolean isNoClickAndDrag() { 131 return Config.getPref().getBoolean("buildings_tools.noclickdrag", false); 132 } 133 134 public static void setNoClickAndDrag(boolean noClickDrag) { 135 Config.getPref().putBoolean("buildings_tools.noclickdrag", noClickDrag); 136 } 129 137 }
Note:
See TracChangeset
for help on using the changeset viewer.