feat(layers): search boxes in the layer dropdown and Layer Manager (#343)

The ribbon layer dropdown gets a live search field above the list
(cleared when the dropdown closes, panel height tracks the filtered
count), and the Layer Manager toolbar gets one too. Both filter by
case-insensitive substring while toggle/rename messages keep the
original row indices, so acting on a filtered row hits the right layer.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Hakan Seven 2026-07-21 23:41:27 +03:00
commit 3dd27c6789
5 changed files with 106 additions and 4 deletions

View file

@ -3246,6 +3246,15 @@ impl OpenCADStudio {
self.modal_drag_last = None;
Task::none()
}
Message::RibbonLayerFilterChanged(f) => {
self.ribbon.layer_filter = f;
Task::none()
}
Message::LayerManagerFilterChanged(f) => {
let i = self.active_tab;
self.tabs[i].layers.filter = f;
Task::none()
}
Message::LayerNameColGrab => {
// Start a Name-column divider drag; rides ModalDragMove.
self.layer_col_dragging = true;