Refactor cell marking, add undo, update keybindings

CellWidget::set_selected and set_marked now return &mut Self for method
chaining. Added BoardState::undo_marked_cell to remove the last marked
cell and restore focus. Backspace triggers undo, Delete clears marking.
This commit is contained in:
GarandPLG committed 2026-04-13 16:57:44 +02:00
1 parent d5f4d03264
commit 1393f282e8
6 files changed
+74 -34

No files matched your search

+2 -1
View File
@@ -84,7 +84,8 @@ pub fn skirmish_keybindings(app: &mut App, key_event: &KeyEvent) {
ZoomLevel::ZoomedOut => {}
},
Action::Space => board.toggle_marking(),
Action::Backspace => {
Action::Backspace => board.undo_marked_cell(),
Action::Delete => {
board.marking_cells = false;
board.clear_marked_cells()
}