From e4dc9f41f609f0e3dc24eac7f9798525019c68f3 Mon Sep 17 00:00:00 2001 From: vsv Date: Wed, 6 Dec 2017 17:40:06 +0300 Subject: [PATCH] Issue #2324: Update object browser after hide all on Linux --- src/XGUI/XGUI_ObjectsBrowser.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/XGUI/XGUI_ObjectsBrowser.cpp b/src/XGUI/XGUI_ObjectsBrowser.cpp index 76a63127a..983f4c37e 100644 --- a/src/XGUI/XGUI_ObjectsBrowser.cpp +++ b/src/XGUI/XGUI_ObjectsBrowser.cpp @@ -624,11 +624,12 @@ void XGUI_ObjectsBrowser::setStateForDoc(DocumentPtr theDoc, const std::listrowCount(); + int aNb = myDocModel->rowCount(theParent); for (int i = 0; i < aNb; i++) { - QModelIndex aIdx = theParent.child(i, theColumn); - myTreeView->update(aIdx); - updateAllIndexes(theColumn, aIdx); + QModelIndex aIdx = myDocModel->index(i, theColumn, theParent); + if (aIdx.isValid()) { + myTreeView->update(aIdx); + updateAllIndexes(theColumn, aIdx); + } } } -- 2.39.2