fix: Deactivate active tool on Escape key press
This commit is contained in:
@@ -1639,7 +1639,7 @@ void ViewportWidget::keyPressEvent(QKeyEvent *event)
|
||||
update();
|
||||
return;
|
||||
}
|
||||
if (m_isDefiningRectangle) {
|
||||
else if (m_isDefiningRectangle) {
|
||||
m_isDefiningRectangle = false;
|
||||
setProperty("widthInput", "");
|
||||
setProperty("heightInput", "");
|
||||
@@ -1647,12 +1647,17 @@ void ViewportWidget::keyPressEvent(QKeyEvent *event)
|
||||
update();
|
||||
return;
|
||||
}
|
||||
if (m_isSelectingPlane) {
|
||||
else if (m_isSelectingPlane) {
|
||||
m_isSelectingPlane = false;
|
||||
m_highlightedPlane = SketchPlane::NONE;
|
||||
m_currentPlane = SketchPlane::XY;
|
||||
update();
|
||||
return;
|
||||
}
|
||||
else if (m_activeTool) {
|
||||
emit toolDeactivated();
|
||||
update();
|
||||
return;
|
||||
}
|
||||
}
|
||||
QOpenGLWidget::keyPressEvent(event);
|
||||
|
||||
Reference in New Issue
Block a user