Salome HOME
EDF-#25841: fix bug; mis-selection of model-index duc/fix_for_panthere
authorDUC ANH HOANG <duc-anh-externe.hoang@edf.fr>
Fri, 9 Sep 2022 09:07:54 +0000 (11:07 +0200)
committerDUC ANH HOANG <duc-anh-externe.hoang@edf.fr>
Fri, 9 Sep 2022 13:39:14 +0000 (15:39 +0200)
src/ObjBrowser/OB_Browser.cxx

index acf7ecc87f6763d6b3cbd08976366f4557afa759..9d54686221952d41eb3bd6d583a9ebf60b019a47 100644 (file)
@@ -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