Store the selected state before deselect all the rows

We must toggle the state of the row based on the original state.
Otherwise on single mode, clicking on a selected row keep it selected.

Closes #14045
(grafted from 9beab3cc71d067f603a133540bac10eb77ea3228)

--HG--
branch : 7.0
This commit is contained in:
Cédric Krier committed 2025-05-28 18:15:07 +02:00
1 parent 948320b6ce
commit e689a0d636
1 file changed
+2 -1
+2 -1
View File
@@ -1887,12 +1887,13 @@
current_record = this.tree.screen.current_record;
this.tree.select_records(current_record, this.record);
} else {
let selected = this.is_selected();
if (!(event_.ctrlKey || event_.metaKey) ||
this.tree.selection_mode ==
Sao.common.SELECTION_SINGLE) {
this.tree.select_records(null, null);
}
this.set_selection(!this.is_selected());
this.set_selection(!selected);
}
this.selection_changed();
if (current_record) {