From 3d1b1cd8a830f669cd80cb34949fda0be75fffc1 Mon Sep 17 00:00:00 2001 From: DUC ANH HOANG Date: Fri, 9 Sep 2022 11:07:54 +0200 Subject: [PATCH] EDF-#25841: fix bug; mis-selection of model-index --- src/ObjBrowser/OB_Browser.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.39.2