Changeset 21875 in osm for applications
- Timestamp:
- 2010-06-21T21:58:58+02:00 (14 years ago)
- Location:
- applications/editors/josm/plugins/buildings_tools/src/buildings_tools
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/buildings_tools/src/buildings_tools/Building.java
r21846 r21875 122 122 p1.north() + Math.cos(heading) * len * meter - Math.sin(heading) * width * meter); 123 123 en[3] = new EastNorth(p1.east() + Math.cos(heading) * width * meter, 124 p1.north() - Math.sin(heading) * width 124 p1.north() - Math.sin(heading) * width * meter); 125 125 } 126 126 -
applications/editors/josm/plugins/buildings_tools/src/buildings_tools/BuildingSizeDialog.java
r21846 r21875 25 25 private JFormattedTextField tlenstep = new JFormattedTextField(NumberFormat.getInstance()); 26 26 private JCheckBox caddr = new JCheckBox(tr("Use Address dialog")); 27 private JCheckBox cAutoSelect = new JCheckBox(tr("Auto-select building")); 27 28 28 29 static void addLabelled(JPanel panel, String str, Component c) { … … 44 45 addLabelled(panel, tr("Length step:"), tlenstep); 45 46 panel.add(caddr, GBC.eol().fill(GBC.HORIZONTAL)); 47 panel.add(cAutoSelect, GBC.eol().fill(GBC.HORIZONTAL)); 46 48 47 49 twidth.setValue(ToolSettings.getWidth()); 48 50 tlenstep.setValue(ToolSettings.getLenStep()); 49 51 caddr.setSelected(ToolSettings.isUsingAddr()); 52 cAutoSelect.setSelected(ToolSettings.isAutoSelect()); 50 53 51 54 JButton bAdv = new JButton(tr("Advanced...")); … … 89 92 ToolSettings.setSizes(width(), lenstep()); 90 93 ToolSettings.setAddrDialog(useAddr()); 94 ToolSettings.setAutoSelect(cAutoSelect.isSelected()); 91 95 } 92 96 } -
applications/editors/josm/plugins/buildings_tools/src/buildings_tools/BuildingsToolsPlugin.java
r21236 r21875 24 24 super(info); 25 25 Main.main.menu.editMenu.addSeparator(); 26 MainMenu.add(Main.main.menu.editMenu, new BuildingSizeAction()); 26 MainMenu.add(Main.main.menu.editMenu, new BuildingSizeAction()); 27 27 } 28 28 @Override public void mapFrameInitialized(MapFrame oldFrame, MapFrame newFrame) { -
applications/editors/josm/plugins/buildings_tools/src/buildings_tools/DrawBuildingAction.java
r21869 r21875 179 179 this.isCtrlDown = isCtrlDown; 180 180 this.isShiftDown = isShiftDown; 181 processMouseEvent(null); 181 182 updCursor(); 182 } 183 ev.getID(); 183 if (mode != Mode.None) 184 Main.map.mapView.repaint(); 185 } 184 186 185 187 if (ev.getKeyCode() == KeyEvent.VK_ESCAPE && ev.getID() == KeyEvent.KEY_PRESSED) { … … 233 235 234 236 private void processMouseEvent(MouseEvent e) { 235 mousePos = e.getPoint(); 236 isCtrlDown = e.isControlDown(); 237 isShiftDown = e.isShiftDown(); 237 if (e != null) { 238 mousePos = e.getPoint(); 239 isCtrlDown = e.isControlDown(); 240 isShiftDown = e.isShiftDown(); 241 } 238 242 if (mode == Mode.None) { 239 243 nextMode = Mode.None; … … 295 299 if (w != null && ToolSettings.isUsingAddr()) 296 300 showAddrDialog(w); 301 if (ToolSettings.isAutoSelect() && 302 (Main.main.getCurrentDataSet().getSelected().isEmpty() || isShiftDown)) { 303 Main.main.getCurrentDataSet().setSelected(w); 304 } 297 305 } 298 306 cancelDrawing(); -
applications/editors/josm/plugins/buildings_tools/src/buildings_tools/ToolSettings.java
r21846 r21875 8 8 private static boolean useAddr; 9 9 private static String tag = "yes"; 10 private static boolean autoSelect; 10 11 11 12 public static void setAddrDialog(boolean _useAddr) { … … 53 54 return Main.pref.getBoolean("buildings_tools.softcursor", false); 54 55 } 56 57 public static boolean isAutoSelect() { 58 return autoSelect; 59 } 60 61 public static void setAutoSelect(boolean _autoSelect) { 62 autoSelect = _autoSelect; 63 } 55 64 }
Note:
See TracChangeset
for help on using the changeset viewer.