fix(selection): individual picks accumulate; Shift+click removes

Single-click picking cleared the selection first (exclusive), so clicking a
second object dropped the first (issue #47). Plain clicks now add to the
selection and Shift+click removes the picked entity; empty-space click and
Esc still clear. Shift state is tracked from keyboard ModifiersChanged
events since mouse click messages carry no modifiers.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Hakan SevenandClaude Opus 4.8 committed 2026-05-30 21:54:35 +03:00
1 parent e4668c66e7
commit 1b3760913e
4 files changed
+33 -2

No files matched your search

+3
View File
@@ -995,6 +995,9 @@ impl OpenCADStudio {
iced::Event::Window(window::Event::Resized(sz)) => {
Some(Message::WindowResized(sz.width as f32, sz.height as f32))
}
iced::Event::Keyboard(keyboard::Event::ModifiersChanged(m)) => {
Some(Message::SetShiftDown(m.shift()))
}
iced::Event::Keyboard(keyboard::Event::KeyPressed {
key, modifiers, text, ..
}) => {