Do not change the selection of row when starting the edition

The edition of tree row relies on having the current record of the screen set
to the row edited. This can be only guarantee if we do not change the
selection.

Closes #14097
(grafted from 64ddd011cdc1a25649f0f0fa68255073e70d3e84)

--HG--
branch : 6.0
This commit is contained in:
Cédric Krier committed 2025-07-15 10:21:41 +02:00
1 parent 32366c9db7
commit 2346ddcf36
1 file changed
+6 -3
+6 -3
View File
@@ -1835,10 +1835,13 @@
}
listener.on('click.sao.editabletree', handler);
Sao.View.Tree.RowEditable._super.select_row.call(this, event_);
if (!event_.shiftKey && !(event_.ctrlKey || event_.metaKey)) {
// do not call super when editing row because the selection must
// not be changed
if (!event_.shiftKey && !(event_.ctrlKey || event_.metaKey) &&
(this.record === current_record)) {
this.tree.edit_row(this);
} else {
Sao.View.Tree.RowEditable._super.select_row.call(this, event_);
}
},
unset_editable: function() {