From 859f583ad10b6f080d017d575b209deeb66850b8 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Tue, 23 Sep 2025 09:20:40 +0200 Subject: [PATCH] editor: auto show widget on selection --- CHANGELOG.md | 2 ++ src/client/editor/index.mjs | 3 +++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b22a0f66..044ea378 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,8 @@ - root/panel/modal/tab: support setting `scroll` to `hidden` (hides scrollbars and allows scrolling) - add new `scrollbar` widget that connects to a scrolling container widget and acts as it scrollbar +- editor + - selecting a widget automatically shows it in the widget tree if it's not minimized - scripting - user scripts are longer protected against infinite loop and the main window object may be reached (it's not supported to break out of scripting context, but resources are no longer wasted to prevent it) diff --git a/src/client/editor/index.mjs b/src/client/editor/index.mjs index d2ab423d..37509314 100644 --- a/src/client/editor/index.mjs +++ b/src/client/editor/index.mjs @@ -672,6 +672,9 @@ class Editor { } this.widgetTree.select(this.selectedWidgets) this.widgetDragResize.create(this.selectedWidgets) + if (!this.widgetTree.parent.minimized) { + this.widgetTree.showWidget(editor.selectedWidgets[editor.selectedWidgets.length-1]) + } }