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 <noreply@anthropic.com>
This commit is contained in:
Dion Moult
2026-04-30 12:37:37 +10:00
parent 51971dd493
commit 6341d7dd31
+10
View File
@@ -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_) {