]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/XGUI/XGUI_DataModel.cpp
Salome HOME
Fixes for issue #1956 and issue #2104 : correctly remove features on part remove.
[modules/shaper.git] / src / XGUI / XGUI_DataModel.cpp
index 88fb28eeb6c6eff05766fad8028f74dd1611e778..2eef35a764ad3cc07869240ddb8a9d30aadfbfa4 100644 (file)
@@ -644,11 +644,7 @@ QModelIndex XGUI_DataModel::index(int theRow, int theColumn, const QModelIndex &
           } else {
             // this is an object under sub document root
             std::string aType = myXMLReader->subType();
-            int aCount = theRow - aNbSubFolders;
-            // To check number of objects before using
-            if (aSubDoc->size(aType) <= aCount)
-              return QModelIndex();
-            ObjectPtr aObj = aSubDoc->object(aType, aCount);
+            ObjectPtr aObj = aSubDoc->object(aType, theRow - aNbSubFolders);
             aIndex = objectIndex(aObj);
           }
         } else {