feat(layers): multi-select layers in the Layer Manager (#236)
The Layer Manager only allowed one layer at a time. Now: - Ctrl/Cmd-click toggles a layer in the selection; Shift-click selects the range from the anchor; a plain click selects just one. - Colour, linetype and lineweight changes apply to every selected layer. - Delete removes all selected layers at once (reusing the #237 non-empty warning, now pluralised); layer "0" and the current layer are skipped. Selection is stored as row indices but re-resolved by name across sorts and layer-table rebuilds, so it never points at the wrong rows. Modifier state is tracked via a new SetModifiers message (shift + ctrl/cmd). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
2712bb80e4
commit
ada9952f06
6 changed files with 178 additions and 73 deletions
|
|
@ -1464,7 +1464,12 @@ impl OpenCADStudio {
|
|||
Some(Message::WindowResized(sz.width as f32, sz.height as f32))
|
||||
}
|
||||
iced::Event::Keyboard(keyboard::Event::ModifiersChanged(m)) => {
|
||||
Some(Message::SetShiftDown(m.shift()))
|
||||
// `command()` is Cmd on macOS, Ctrl elsewhere — the
|
||||
// platform multi-select modifier for the layer list.
|
||||
Some(Message::SetModifiers {
|
||||
shift: m.shift(),
|
||||
ctrl: m.command() || m.control(),
|
||||
})
|
||||
}
|
||||
iced::Event::Keyboard(keyboard::Event::KeyPressed {
|
||||
key,
|
||||
|
|
|
|||
Loading…
Reference in a new issue