Commit c7eada2c authored by Christian Winter's avatar Christian Winter

brush selection now respects line thickness when selecting edges. minor...

brush selection now respects line thickness when selecting edges. minor bugfix. redraw was missing in brush selection when only mouse button down/up was used without movement
parent 0506044f
Pipeline #4621015 passed with stage
in 1 minute and 8 seconds
......@@ -102,6 +102,7 @@ class MouseHandler {
}
else if (Logic.currentState instanceof BrushSelectionState) {
Logic.currentState.update();
Renderer.redraw();
}
else if (Logic.currentState instanceof ContinousDrawingState) {
Logic.currentState.oldPos = Logic.shouldSnap() ? currentPosition.copy() : mousePosition.copy();
......@@ -178,6 +179,7 @@ class MouseHandler {
}
else if (Logic.currentState instanceof BrushSelectionState) {
Logic.currentState.update();
Renderer.redraw();
}
else if (e.ctrlKey) {
Logic.setState(new ZoomState());
......
......@@ -13,7 +13,7 @@
if (Preferences.selectEdges) {
for (let line of File.currentLayer.lines.concat(Selection.data.partialLines)) {
if (Utilities.distancePointToLine(mousePosition, line) <= cursorRange) {
if (Utilities.distancePointToLine(mousePosition, line) <= cursorRange + (line.thickness * 0.5)) {
newSelPoints.push(line.start);
newSelPoints.push(line.end);
}
......@@ -40,7 +40,7 @@
if (Preferences.selectEdges) {
for (let line of Selection.data.lines.concat(Selection.data.partialLines)) {
if (Utilities.distancePointToLine(mousePosition, line) <= cursorRange) {
if (Utilities.distancePointToLine(mousePosition, line) <= cursorRange + (line.thickness * 0.5)) {
newUnselPoints.push(line.start);
newUnselPoints.push(line.end);
}
......
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