Commit 345e6d3c authored by Christian Winter's avatar Christian Winter

box selection now if RMB drag without selection

parent 5790bb68
Pipeline #4745457 passed with stage
in 54 seconds
......@@ -169,10 +169,15 @@ class MouseHandler {
Selection.changeSelectionForPoints(pointsToChangeSelection);
if (pointsToChangeSelection != null) {
if (pointsToChangeSelection.length > 0) {
Logic.setState(new MoveLinesState());
Logic.currentState.initializedWithRMBDown = true;
}
else {
Logic.setState(new BoxSelectionState());
Logic.currentState.initializedWithRMBDown = true;
Logic.currentState.start(true);
}
}
else if (Logic.currentState instanceof BoxSelectionState) {
Logic.currentState.cancel();
......@@ -317,6 +322,13 @@ class MouseHandler {
Logic.setState(new IdleState());
Renderer.redraw();
}
else if (Logic.currentState instanceof BoxSelectionState) // end box selection initialized with RMB
{
if (Logic.currentState.initializedWithRMBDown) {
Logic.currentState.execute();
Logic.setState(new IdleState());
}
}
}
}
......
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