Fix reset section box to always fully reset

This commit is contained in:
Mike Tasset
2025-08-05 20:07:35 +02:00
parent d46f2203d9
commit 08fc2e09bb
2 changed files with 8 additions and 2 deletions
@@ -72,7 +72,7 @@ const emit = defineEmits<{
const { getShortcutDisplayText, shortcuts, registerShortcuts } = useViewerShortcuts()
const {
toggleSectionBox,
resetSectionBox,
resetSectionBoxCompletely,
closeSectionBox,
isSectionBoxEnabled,
isSectionBoxVisible
@@ -188,7 +188,7 @@ const onReset = () => {
resetExplode()
}
if (activePanel.value === ActivePanel.sectionBox) {
resetSectionBox()
resetSectionBoxCompletely()
}
}
@@ -84,12 +84,18 @@ export function useSectionBoxUtilities() {
}
}
const resetSectionBoxCompletely = () => {
sectionBox.value = null
visible.value = false
}
return {
isSectionBoxEnabled,
isSectionBoxVisible,
isSectionBoxEdited,
toggleSectionBox,
resetSectionBox,
resetSectionBoxCompletely,
sectionBox,
closeSectionBox
}