o-spreadsheet
o-spreadsheet copied to clipboard
[IMP] selection: allow to de-select a zone
Description:
Before this pr:
- Ctrl+Click on a selected cell had no effect.
- Users could add to the selection, but couldn't remove cells or zones.
Issue Example:
- Select range A1:C3.
- Ctrl+Click on B2.
- Expected: Selection splits into A1:C1, A2, C2, A3:C3.
- Previously, Ctrl+Click did not deselect B2.
After this pr:
- Ctrl+Click on a selected cell now removes it.
- The selection splits into separate zones as needed.
Technical Changes:
- UpdateSelection is now triggered on mouseup, allowing precise detection of Ctrl+Click behavior.
- The selection logic removes the zone from any existing selection zones.
- Splits overlapping zones into non-overlapping parts.
Task: 4647187
review checklist
- [ ] feature is organized in plugin, or UI components
- [ ] support of duplicate sheet (deep copy)
- [ ] in model/core: ranges are Range object, and can be adapted (adaptRanges)
- [ ] in model/UI: ranges are strings (to show the user)
- [ ] undo-able commands (uses this.history.update)
- [ ] multiuser-able commands (has inverse commands and transformations where needed)
- [ ] new/updated/removed commands are documented
- [ ] exportable in excel
- [ ] translations (_t("qmsdf %s", abc))
- [ ] unit tested
- [ ] clean commented code
- [ ] track breaking changes
- [ ] doc is rebuild (npm run doc)
- [ ] status is correct in Odoo
