From: DUC ANH HOANG Date: Fri, 9 Sep 2022 09:07:54 +0000 (+0200) Subject: EDF-#25841: fix bug; mis-selection of model-index X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=252f9e753ab5e6741b764ba5d0907d355a491a1d;p=modules%2Fgui.git EDF-#25841: fix bug; mis-selection of model-index --- diff --git a/src/ObjBrowser/OB_Browser.cxx b/src/ObjBrowser/OB_Browser.cxx index 9fa0cfa33..170814996 100644 --- a/src/ObjBrowser/OB_Browser.cxx +++ b/src/ObjBrowser/OB_Browser.cxx @@ -433,7 +433,8 @@ void OB_Browser::select( const QModelIndexList& indexes, const bool on, const bo for (int i = 1; i < indexes.size(); ++i) { idx=indexes.at(i); - if(idx.parent().row()==last.parent().row() && idx.parent().column()==last.parent().column() && + // The indexes must have the same parent to be selected + if(idx.parent()==last.parent() && idx.row()==last.row()+1 && idx.column()==last.column()) { // index is contiguous to last: extend the range