From 6341d7dd3172b7e77ed7072d727b1722832e7f6c Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Thu, 30 Apr 2026 12:37:37 +1000 Subject: [PATCH] ifcviewer: bind Shift+K to clear all section planes Convenient escape hatch when the user has stacked several cuts and wants to start over without exiting the tool first. Also resets the selection and drag state. Co-Authored-By: Claude Opus 4.7 --- src/ifcviewer/ViewportWindow.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/ifcviewer/ViewportWindow.cpp b/src/ifcviewer/ViewportWindow.cpp index 3dfe0fa2a4..29a5a97144 100644 --- a/src/ifcviewer/ViewportWindow.cpp +++ b/src/ifcviewer/ViewportWindow.cpp @@ -1514,6 +1514,16 @@ void ViewportWindow::keyPressEvent(QKeyEvent* event) { toggleSectionTool(); return; } + // Shift+K clears every section plane (and the selection). + if (key == Qt::Key_K + && event->modifiers() == Qt::ShiftModifier + && !event->isAutoRepeat()) { + clearSectionPlanes(); + section_plane_selected_ = -1; + section_drag_active_ = false; + section_drag_index_ = -1; + return; + } // While the section tool is active: Esc exits the tool, Delete removes // the selected plane. if (section_tool_active_) {