]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
#1347 Fatal error when rename group
authornds <nds@opencascade.com>
Tue, 1 Mar 2016 14:32:05 +0000 (17:32 +0300)
committernds <nds@opencascade.com>
Tue, 1 Mar 2016 14:32:05 +0000 (17:32 +0300)
src/XGUI/XGUI_OperationMgr.cpp
src/XGUI/XGUI_Workshop.cpp

index 533bb6adce8006e68fdd757cf9bdba069e5c1430..3e6c412235cbbcaef8a5b84a0576d08f1632c321 100644 (file)
@@ -667,7 +667,7 @@ bool XGUI_OperationMgr::onProcessDelete(QObject* theObject)
     XGUI_ObjectsBrowser* aBrowser = workshop()->objectBrowser();
     QWidget* aViewPort = myWorkshop->viewer()->activeViewPort();
     // property panel child object is processed to process delete performed on Apply button of PP
-    if (isChildObject(theObject, aBrowser) ||
+    if (theObject == aBrowser->treeView() ||
         isChildObject(theObject, aViewPort) ||
         isPPChildObject)
       workshop()->deleteObjects();
index ab326f3dfefa513769da7b8ac4bfb90c5d7e36c5..cb56c38795c4e51f8a1c29093dfa6b31a54ee0f2 100755 (executable)
@@ -1436,6 +1436,11 @@ bool XGUI_Workshop::isDeleteFeatureWithReferences(const QObjectPtrList& theList,
   QStringList aPartFeatureNames;
   foreach (ObjectPtr aObj, theList) {
     FeaturePtr aFeature = ModelAPI_Feature::feature(aObj);
+    // invalid feature data means that the feature is already removed in model,
+    // we needn't process it. E.g. delete of feature from create operation. The operation abort
+    // will delete the operation
+    if (!aFeature->data()->isValid())
+      continue;
     ResultPtr aFirstResult = aFeature->firstResult();
     std::string aResultGroupName = aFirstResult->groupName();
     if (aResultGroupName == ModelAPI_ResultPart::group())