diff --git a/src/ApplicationController.cpp b/src/ApplicationController.cpp index 5255b65..0c113d5 100644 --- a/src/ApplicationController.cpp +++ b/src/ApplicationController.cpp @@ -102,6 +102,9 @@ bool ApplicationController::saveDocumentAs() void ApplicationController::beginSketchCreation() { + if (m_activeSketch) { + return; + } emit planeSelectionModeStarted(); } diff --git a/src/ViewportWidget.cpp b/src/ViewportWidget.cpp index 6154ea8..cf897a9 100644 --- a/src/ViewportWidget.cpp +++ b/src/ViewportWidget.cpp @@ -489,6 +489,13 @@ void ViewportWidget::keyPressEvent(QKeyEvent *event) update(); return; } + if (m_isSelectingPlane) { + m_isSelectingPlane = false; + m_highlightedPlane = SketchPlane::NONE; + m_currentPlane = SketchPlane::XY; + update(); + return; + } } QOpenGLWidget::keyPressEvent(event); } @@ -566,6 +573,7 @@ void ViewportWidget::onPlaneSelectionModeStarted() { m_isSelectingPlane = true; m_highlightedPlane = SketchPlane::NONE; + m_currentPlane = SketchPlane::NONE; update(); }