]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #18609 (Tuleap): Delete extra nodes from folder
authorvsv <vsv@opencascade.com>
Fri, 6 Mar 2020 10:03:27 +0000 (13:03 +0300)
committervsv <vsv@opencascade.com>
Fri, 6 Mar 2020 10:03:27 +0000 (13:03 +0300)
src/PartSet/PartSet_TreeNodes.cpp
src/XGUI/XGUI_ObjectsBrowser.cpp

index e886365e2b28a63e4b789b5108d2b33b4cba15e3..dcd74cf6c0090934100500dc2607fb03d2b3814c 100644 (file)
@@ -1083,7 +1083,7 @@ void PartSet_ObjectFolderNode::update()
     int aNbOfFeatures = aDoc->size(ModelAPI_Feature::group(), true);
     while (aId < myChildren.size()) {
       ModuleBase_ITreeNode* aNode = myChildren.at(aId);
-      if ((aFirst + aId) < aNbOfFeatures) {
+      if ((aId < aNbItems) && ((aFirst + aId) < aNbOfFeatures)) {
         if (aNode->object() != aDoc->object(ModelAPI_Feature::group(), aFirst + aId)) {
           myChildren.removeAll(aNode);
           delete aNode;
index 75543ff5c9d92d572f1c6357e80a01c3429c264e..754034d3a3cc8b42178ae05569a920e59a5b9880 100644 (file)
@@ -131,7 +131,7 @@ void XGUI_DataTree::commitData(QWidget* theEditor)
       if (XGUI_Tools::canRename(aObj, aName)) {
         SessionPtr aMgr = ModelAPI_Session::get();
         aMgr->startOperation("Rename");
-        aObj->data()->setName(qPrintable(aName));
+        aObj->data()->setName(aName.toStdString());
         aMgr->finishOperation();
       }
     }