Commit 0379eb46 authored by Stefan Schuhbaeck's avatar Stefan Schuhbaeck
Browse files

Fix Issue #14 Topography creator GUI to small objects are created

If a new selection starts (i.e. mousePressed) set the bound of the
default selectionShape based on the current gridResolution and not
on the scale factor. Smaller Shapes can still be created if the
mouse drag motion is used or if a bigger zoom value is used.
parent 28221d7e
......@@ -22,9 +22,14 @@ public class RectangleSelectionMode extends DefaultModeAdapter {
} else {
.setSelectionShape(new VRectangle(panelModel.getMousePosition().x, panelModel.getMousePosition().y,
0.0001 * panelModel.getScaleFactor(), 0.0001 * panelModel.getScaleFactor()));
// Set default dimension of selection shape to current GridResolution.
// If mouse is dragged smaller selection shapes are still possible.
double width = panelModel.getGridResolution();
double height = width;
VRectangle shape = new VRectangle(panelModel.getMousePosition().x,
panelModel.getMousePosition().y, width, height);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment