editor: auto show widget on selection

This commit is contained in:
jean-emmanuel 2025-09-23 09:20:40 +02:00
parent 36c2f90ec1
commit 859f583ad1
2 changed files with 5 additions and 0 deletions

View file

@ -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)

View file

@ -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])
}
}