From a2bc7551bffcaa1daf2701dad5a086b6191fcbd1 Mon Sep 17 00:00:00 2001 From: Tao Schiro Date: Mon, 31 Aug 2026 12:11:56 +0200 Subject: [PATCH 1/2] fix(OneToolAtATime): Only one tool modal can be opened at a time --- app/components/CameraManager.vue | 2 -- app/components/CameraOrientation.vue | 2 -- app/components/ToolPanel.vue | 2 +- app/components/ViewToolbar.vue | 36 ++++++++++++++++++++++------ 4 files changed, 30 insertions(+), 12 deletions(-) diff --git a/app/components/CameraManager.vue b/app/components/CameraManager.vue index 15c19128..18aabcca 100644 --- a/app/components/CameraManager.vue +++ b/app/components/CameraManager.vue @@ -35,8 +35,6 @@ function handleClose() { title="Camera Positions" :width="width" :escapeFunction="handleClose" - style="top: 90px; right: 55px" - z-index="1" > diff --git a/app/components/CameraOrientation.vue b/app/components/CameraOrientation.vue index e3abe185..da15dc90 100644 --- a/app/components/CameraOrientation.vue +++ b/app/components/CameraOrientation.vue @@ -174,8 +174,6 @@ watch(hoveredFace, (newFace, oldFace) => { title="Camera Orientations" :width="width" :escapeFunction="escapeFunction" - style="top: 90px; right: 55px" - z-index="1" >
{ } }); +function closeAllToolsExcept(toolRef) { + const tools = [ + showCameraOrientation, + show_camera_manager, + take_screenshot, + showZScaling, + showClippingPlanes, + showShrinkFilter, + showRuler, + ]; + for (const tool of tools) { + if (tool !== toolRef) { + tool.value = false; + } + } +} + +function toggleTool(toolRef) { + closeAllToolsExcept(toolRef); + toolRef.value = !toolRef.value; +} + const camera_options = computed(() => [ { testId: "resetCameraButton", @@ -118,7 +140,7 @@ const camera_options = computed(() => [ tooltip: "Camera orientation", icon: "mdi-rotate-3d", action: () => { - showCameraOrientation.value = !showCameraOrientation.value; + toggleTool(showCameraOrientation); }, }, { @@ -127,7 +149,7 @@ const camera_options = computed(() => [ icon: CameraBookmarkIcon, iconSize: 34, action: () => { - show_camera_manager.value = !show_camera_manager.value; + toggleTool(show_camera_manager); }, }, { @@ -135,7 +157,7 @@ const camera_options = computed(() => [ tooltip: "Take a screenshot", icon: "mdi-camera", action: () => { - take_screenshot.value = !take_screenshot.value; + toggleTool(take_screenshot); }, }, { @@ -165,7 +187,7 @@ const camera_options = computed(() => [ tooltip: "Z Scaling Control", icon: "mdi-sort", action: () => { - showZScaling.value = !showZScaling.value; + toggleTool(showZScaling); }, }, { @@ -174,7 +196,7 @@ const camera_options = computed(() => [ icon: "mdi-content-cut", color: showClippingPlanes.value ? "primary" : undefined, action: () => { - showClippingPlanes.value = !showClippingPlanes.value; + toggleTool(showClippingPlanes); }, }, { @@ -183,7 +205,7 @@ const camera_options = computed(() => [ icon: "mdi-arrow-collapse-all", color: showShrinkFilter.value ? "primary" : undefined, action: () => { - showShrinkFilter.value = !showShrinkFilter.value; + toggleTool(showShrinkFilter); }, }, { @@ -192,7 +214,7 @@ const camera_options = computed(() => [ icon: "mdi-ruler", color: showRuler.value ? "primary" : undefined, action: () => { - showRuler.value = !showRuler.value; + toggleTool(showRuler); }, }, ]); From e57d3b9bf0f9e584af8e19ddc6106834703ab480 Mon Sep 17 00:00:00 2001 From: SpliiT <106495600+SpliiT@users.noreply.github.com> Date: Mon, 31 Aug 2026 10:13:57 +0000 Subject: [PATCH 2/2] Apply prepare changes --- app/components/CameraManager.vue | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/app/components/CameraManager.vue b/app/components/CameraManager.vue index 18aabcca..d03b743d 100644 --- a/app/components/CameraManager.vue +++ b/app/components/CameraManager.vue @@ -30,12 +30,7 @@ function handleClose() {