From e1761eb489fe887042284d651883857ba8ea714f Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Mon, 19 Oct 2026 05:14:59 -0700 Subject: [PATCH] Layers: the panel options command describes when Locate Selected Objects opens nothing The params text of ui.layersPanelOptions and the doc comment on PanelOptions::locate_selected said that, with the option on, the panel opens the rows around any object selected outside it and scrolls to its row. When Show Layers Only, a search or the filter leaves the object without a row, the panel opens no rows for it and scrolls as with the option off. Both texts now describe that case, as docs/mcp.md does. --- crates/ui-egui/src/menus.rs | 2 +- crates/ui-egui/src/panels/layers.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/ui-egui/src/menus.rs b/crates/ui-egui/src/menus.rs index 74dae2a99..06102e856 100644 --- a/crates/ui-egui/src/menus.rs +++ b/crates/ui-egui/src/menus.rs @@ -553,7 +553,7 @@ pub const UI_COMMANDS: &[(&str, &str, &str, &str)] = &[ "ui.layersPanelOptions", "Panel Options…", "", - "{} open the Layers panel's Panel Options: dialog `layersPanelOptions`, fields layersOnly, locateSelected (Locate Selected Objects, off by default: when the last selected object changes outside the panel, on the canvas or by a command, the panel opens the layers and groups around it and scrolls to its row, as after layer.locate, without highlighting the row; a change made during a drag is located when the drag ends), rowSize (small|medium|large|other), otherSize (12–100 pt), thumbLayers, thumbGroups, thumbObjects; OK applies them (kept with the UI state)", + "{} open the Layers panel's Panel Options: dialog `layersPanelOptions`, fields layersOnly, locateSelected (Locate Selected Objects, off by default: when the last selected object changes outside the panel, on the canvas or by a command, the panel opens the layers and groups around it and scrolls to its row, as after layer.locate, without highlighting the row; when Show Layers Only, a search or the filter leaves the object without a row, the panel opens no rows for it and scrolls as with the option off; a change made during a drag is located when the drag ends), rowSize (small|medium|large|other), otherSize (12–100 pt), thumbLayers, thumbGroups, thumbObjects; OK applies them (kept with the UI state)", ), ( "ui.layersExpand", diff --git a/crates/ui-egui/src/panels/layers.rs b/crates/ui-egui/src/panels/layers.rs index 8e52dd0d8..3871b7df7 100644 --- a/crates/ui-egui/src/panels/layers.rs +++ b/crates/ui-egui/src/panels/layers.rs @@ -68,7 +68,8 @@ pub struct PanelOptions { pub layers_only: bool, /// Locate Selected Objects (off by default): when the last selected object changes outside the /// panel, on the canvas or by a command, the panel opens the rows around it and scrolls to its - /// row, as after Locate Object, without highlighting the row. + /// row, as after Locate Object, without highlighting the row. When Show Layers Only, a search or + /// the filter leaves the object without a row, the panel opens no rows for it. pub locate_selected: bool, /// Row height in points: [`ROW_SMALL`], [`ROW_MEDIUM`], [`ROW_LARGE`] or another (12–100). pub row_size: f32,