]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix problem of dataModel rebuild
authorvsv <vitaly.smetannikov@opencascade.com>
Thu, 21 Apr 2016 13:37:06 +0000 (16:37 +0300)
committervsv <vitaly.smetannikov@opencascade.com>
Thu, 21 Apr 2016 13:37:20 +0000 (16:37 +0300)
src/XGUI/XGUI_DataModel.cpp
src/XGUI/XGUI_ObjectsBrowser.cpp

index 585f773b24ec9ebd99a059feae190eeea39313e4..47c0af2923de050d7723cd8edb9dbd2eb6f4325b 100644 (file)
@@ -234,10 +234,10 @@ void XGUI_DataModel::processEvent(const std::shared_ptr<Events_Message>& theMess
         QModelIndex aIndex = objectIndex(aObject);
         if (aIndex.isValid()) {
           emit dataChanged(aIndex, aIndex);
-        }/* else {
+        } else {
           rebuildDataTree();
           break;
-        }*/
+        }
       } else {
         rebuildDataTree();
         break;
index be2ff3db825f7a27fa3a3e0a70f1d9a8421c75fd..7d6410a49eed6162e1e89f6cb7a3aaa89ab905e3 100644 (file)
@@ -455,7 +455,7 @@ QModelIndexList XGUI_ObjectsBrowser::expandedItems(const QModelIndex& theParent)
 {
   QModelIndexList aIndexes;
   QModelIndex aIndex;
-  for (int i = 0; i < myDocModel->rowCount(); i++) {
+  for (int i = 0; i < myDocModel->rowCount(theParent); i++) {
     aIndex = myDocModel->index(i, 0, theParent);
     if (myDocModel->hasChildren(aIndex)) {
       if (myTreeView->isExpanded(aIndex)) {