forked from 1b-agent/opencadstudio-upstream
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 <[email protected]>
This commit is contained in:
1 parent
87f40e7544
commit
3dd27c6789
5 files changed
+106
-4
No files matched your search
@@ -1578,7 +1578,7 @@ impl OpenCADStudio {
|
||||
// window — the same points the grips expose — then
|
||||
// refresh the stored measurement so the value tracks
|
||||
// the stretched geometry.
|
||||
let mut mv = |p: &mut acadrust::types::Vector3| {
|
||||
let mv = |p: &mut acadrust::types::Vector3| {
|
||||
if in_win(p.x, p.y) {
|
||||
p.x += dx;
|
||||
p.y += dy;
|
||||
|
||||
@@ -1625,6 +1625,10 @@ pub enum Message {
|
||||
// ── Ribbon ────────────────────────────────────────────────────────────
|
||||
/// User selected a layer from the layer combobox in the ribbon.
|
||||
RibbonLayerChanged(String),
|
||||
/// Live text of the ribbon layer dropdown's search box (#343).
|
||||
RibbonLayerFilterChanged(String),
|
||||
/// Live text of the Layer Manager's search box (#343).
|
||||
LayerManagerFilterChanged(String),
|
||||
/// User changed the active color in the Properties toolbar.
|
||||
RibbonColorChanged(AcadColor),
|
||||
/// Toggle the full ACI palette inside the ribbon color picker.
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user