From b11b345235436f664876b656e4b8c94a14444fbb Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Sun, 15 Feb 2026 11:11:39 -0700 Subject: [PATCH] fix: Prevent sketch overlap and improve plane selection visibility Co-authored-by: aider (gemini/gemini-2.5-pro) --- src/ApplicationController.cpp | 3 +++ src/ViewportWidget.cpp | 8 ++++++++ 2 files changed, 11 insertions(+) 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(); }