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
This commit is contained in:
@@ -2022,12 +2022,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);
|
||||
}
|
||||
if (event_.shiftKey || event_.ctrlKey || event_.metaKey) {
|
||||
Sao.common.clear_selection();
|
||||
|
||||
Reference in New Issue
Block a user