Sketcher: polyline: fix ESC exit tool

This commit is contained in:
Paddle
2024-01-17 10:27:50 +01:00
committed by Adrián Insaurralde Avalos
parent 919d8c9392
commit 4acff3f66f

View File

@@ -98,11 +98,8 @@ public:
void registerPressedKey(bool pressed, int key) override
{
if (Mode != STATUS_SEEK_Second) {
return; // SegmentMode can be changed only in STATUS_SEEK_Second mode
}
if (key == SoKeyboardEvent::M && pressed && previousCurve != -1) {
if (Mode == STATUS_SEEK_Second && key == SoKeyboardEvent::M && pressed
&& previousCurve != -1) {
// loop through the following modes:
// SEGMENT_MODE_Line, TRANSITION_MODE_Free / TRANSITION_MODE_Tangent
// SEGMENT_MODE_Line, TRANSITION_MODE_Perpendicular_L
@@ -184,6 +181,9 @@ public:
}
mouseMove(onSketchPos); // trigger an update of EditCurve
}
else {
DrawSketchHandler::registerPressedKey(pressed, key);
}
}
void mouseMove(Base::Vector2d onSketchPos) override