Index: applications/editors/josm/plugins/buildings_tools/src/buildings_tools/Building.java
===================================================================
--- applications/editors/josm/plugins/buildings_tools/src/buildings_tools/Building.java	(revision 21869)
+++ applications/editors/josm/plugins/buildings_tools/src/buildings_tools/Building.java	(revision 21875)
@@ -122,5 +122,5 @@
 				p1.north() + Math.cos(heading) * len * meter - Math.sin(heading) * width * meter);
 		en[3] = new EastNorth(p1.east() + Math.cos(heading) * width * meter,
-				p1.north() - Math.sin(heading) * width	* meter);
+				p1.north() - Math.sin(heading) * width * meter);
 	}
 
Index: applications/editors/josm/plugins/buildings_tools/src/buildings_tools/BuildingSizeDialog.java
===================================================================
--- applications/editors/josm/plugins/buildings_tools/src/buildings_tools/BuildingSizeDialog.java	(revision 21869)
+++ applications/editors/josm/plugins/buildings_tools/src/buildings_tools/BuildingSizeDialog.java	(revision 21875)
@@ -25,4 +25,5 @@
 	private JFormattedTextField tlenstep = new JFormattedTextField(NumberFormat.getInstance());
 	private JCheckBox caddr = new JCheckBox(tr("Use Address dialog"));
+	private JCheckBox cAutoSelect = new JCheckBox(tr("Auto-select building"));
 
 	static void addLabelled(JPanel panel, String str, Component c) {
@@ -44,8 +45,10 @@
 		addLabelled(panel, tr("Length step:"), tlenstep);
 		panel.add(caddr, GBC.eol().fill(GBC.HORIZONTAL));
+		panel.add(cAutoSelect, GBC.eol().fill(GBC.HORIZONTAL));
 
 		twidth.setValue(ToolSettings.getWidth());
 		tlenstep.setValue(ToolSettings.getLenStep());
 		caddr.setSelected(ToolSettings.isUsingAddr());
+		cAutoSelect.setSelected(ToolSettings.isAutoSelect());
 
 		JButton bAdv = new JButton(tr("Advanced..."));
@@ -89,4 +92,5 @@
 		ToolSettings.setSizes(width(), lenstep());
 		ToolSettings.setAddrDialog(useAddr());
+		ToolSettings.setAutoSelect(cAutoSelect.isSelected());
 	}
 }
Index: applications/editors/josm/plugins/buildings_tools/src/buildings_tools/BuildingsToolsPlugin.java
===================================================================
--- applications/editors/josm/plugins/buildings_tools/src/buildings_tools/BuildingsToolsPlugin.java	(revision 21869)
+++ applications/editors/josm/plugins/buildings_tools/src/buildings_tools/BuildingsToolsPlugin.java	(revision 21875)
@@ -24,5 +24,5 @@
 		super(info);
 		Main.main.menu.editMenu.addSeparator();
-		MainMenu.add(Main.main.menu.editMenu, new BuildingSizeAction());   
+		MainMenu.add(Main.main.menu.editMenu, new BuildingSizeAction());
 	}
 	@Override public void mapFrameInitialized(MapFrame oldFrame, MapFrame newFrame) {
Index: applications/editors/josm/plugins/buildings_tools/src/buildings_tools/DrawBuildingAction.java
===================================================================
--- applications/editors/josm/plugins/buildings_tools/src/buildings_tools/DrawBuildingAction.java	(revision 21869)
+++ applications/editors/josm/plugins/buildings_tools/src/buildings_tools/DrawBuildingAction.java	(revision 21875)
@@ -179,7 +179,9 @@
 			this.isCtrlDown = isCtrlDown;
 			this.isShiftDown = isShiftDown;
+			processMouseEvent(null);
 			updCursor();
-		}
-		ev.getID();
+			if (mode != Mode.None)
+				Main.map.mapView.repaint();
+		}
 
 		if (ev.getKeyCode() == KeyEvent.VK_ESCAPE && ev.getID() == KeyEvent.KEY_PRESSED) {
@@ -233,7 +235,9 @@
 
 	private void processMouseEvent(MouseEvent e) {
-		mousePos = e.getPoint();
-		isCtrlDown = e.isControlDown();
-		isShiftDown = e.isShiftDown();
+		if (e != null) {
+			mousePos = e.getPoint();
+			isCtrlDown = e.isControlDown();
+			isShiftDown = e.isShiftDown();
+		}
 		if (mode == Mode.None) {
 			nextMode = Mode.None;
@@ -295,4 +299,8 @@
 			if (w != null && ToolSettings.isUsingAddr())
 				showAddrDialog(w);
+			if (ToolSettings.isAutoSelect() &&
+					(Main.main.getCurrentDataSet().getSelected().isEmpty() || isShiftDown)) {
+				Main.main.getCurrentDataSet().setSelected(w);
+			}
 		}
 		cancelDrawing();
Index: applications/editors/josm/plugins/buildings_tools/src/buildings_tools/ToolSettings.java
===================================================================
--- applications/editors/josm/plugins/buildings_tools/src/buildings_tools/ToolSettings.java	(revision 21869)
+++ applications/editors/josm/plugins/buildings_tools/src/buildings_tools/ToolSettings.java	(revision 21875)
@@ -8,4 +8,5 @@
 	private static boolean useAddr;
 	private static String tag = "yes";
+	private static boolean autoSelect;
 
 	public static void setAddrDialog(boolean _useAddr) {
@@ -53,3 +54,11 @@
 		return Main.pref.getBoolean("buildings_tools.softcursor", false);
 	}
+
+	public static boolean isAutoSelect() {
+		return autoSelect;
+	}
+
+	public static void setAutoSelect(boolean _autoSelect) {
+		autoSelect = _autoSelect;
+	}
 }
