Qualify selection mode references

This commit is contained in:
Harrison Booth
2026-10-28 11:47:41 -05:00
parent 40268a3c67
commit 4efd8fc0db
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -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\")"))),
},
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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 {