diff --git a/crates/ui-egui/src/app/commands.rs b/crates/ui-egui/src/app/commands.rs index f05cd08f7..99e70fa75 100644 --- a/crates/ui-egui/src/app/commands.rs +++ b/crates/ui-egui/src/app/commands.rs @@ -228,7 +228,7 @@ impl SheetApp { "ui.selectionMode" => { // `{"mode": "extend"}` (F8), `"add"` (Shift+F8) or `"off"`; `{}` reports the mode. match p.get("mode").and_then(Json::as_str) { - Some(id) => match grid::SelectionMode::parse(id) { + Some(id) => match crate::grid::SelectionMode::parse(id) { Some(mode) => self.grid.set_selection_mode(mode), None => return Some(Err(format!("unknown selection mode {id:?} (use \"extend\", \"add\" or \"off\")"))), }, diff --git a/crates/ui-egui/src/app/editing.rs b/crates/ui-egui/src/app/editing.rs index 9d9e3dd77..2ba978e54 100644 --- a/crates/ui-egui/src/app/editing.rs +++ b/crates/ui-egui/src/app/editing.rs @@ -13,7 +13,7 @@ impl SheetApp { return; } // Editing a cell ends Extend and Add mode, as in Excel. - self.grid.set_selection_mode(grid::SelectionMode::Off); + self.grid.set_selection_mode(crate::grid::SelectionMode::Off); let Some(d) = self.session.active() else { return }; let Some(sh) = d.wb.active() else { return }; let at = sh.merge_at(d.selection.active).map(|m| m.start).unwrap_or(d.selection.active); diff --git a/crates/ui-egui/src/grid/selection.rs b/crates/ui-egui/src/grid/selection.rs index e57694c4d..17995ca2c 100644 --- a/crates/ui-egui/src/grid/selection.rs +++ b/crates/ui-egui/src/grid/selection.rs @@ -3,7 +3,7 @@ use super::geo::Geo; use super::interact::{hidden_col_edge, hidden_row_edge}; #[cfg(test)] use super::show::hidden_around; -use super::{CellRef, Color32, Painter, RangeRef, Rect, Sheet, SheetApp, Stroke, StrokeKind, Tokens, json, pos2, vec2}; +use super::{CellRef, Color32, Painter, RangeRef, Rect, SelectionMode, Sheet, SheetApp, Stroke, StrokeKind, Tokens, json, pos2, vec2}; /// Where the active cell is on screen: the whole merged cell when it is part of one. fn active_rect(geo: &Geo, sh: &Sheet, sel: &gridcraft_engine::Selection) -> Rect {