o-spreadsheet icon indicating copy to clipboard operation
o-spreadsheet copied to clipboard

[IMP] selection: allow to de-select a zone

Open rmbh-odoo opened this issue 8 months ago • 1 comments

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:

  1. Select range A1:C3.
  2. Ctrl+Click on B2.
  3. Expected: Selection splits into A1:C1, A2, C2, A3:C3.
  4. 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

rmbh-odoo avatar Apr 17 '25 04:04 rmbh-odoo

Pull request status dashboard

robodoo avatar Apr 17 '25 04:04 robodoo