feat(editor): Remember different panel state for sub nodes (#16189)

This commit is contained in:
Suguru Inoue
2025-06-11 14:46:19 +02:00
committed by GitHub
parent 21b84ef4e7
commit b9e03515bd
6 changed files with 100 additions and 11 deletions

View File

@@ -4,6 +4,7 @@ import {
findSelectedLogEntry,
getDepth,
getEntryAtRelativeIndex,
isSubNodeLog,
} from '@/features/logs/logs.utils';
import { useTelemetry } from '@/composables/useTelemetry';
import { canvasEventBus } from '@/event-bus/canvas';
@@ -72,6 +73,16 @@ export function useLogsSelection(
syncSelectionToCanvasIfEnabled(nextEntry);
}
watch(
selected,
(sel) => {
if (sel) {
logsStore.setSubNodeSelected(isSubNodeLog(sel));
}
},
{ immediate: true },
);
// Synchronize selection from canvas
watch(
[() => uiStore.lastSelectedNode, () => logsStore.isLogSelectionSyncedWithCanvas],