From: vsv Date: Wed, 6 Dec 2017 14:40:06 +0000 (+0300) Subject: Issue #2324: Update object browser after hide all on Linux X-Git-Tag: V_2.10.0RC~95 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e4dc9f41f609f0e3dc24eac7f9798525019c68f3;p=modules%2Fshaper.git Issue #2324: Update object browser after hide all on Linux --- 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); + } } }