From: nds Date: Tue, 1 Mar 2016 14:32:05 +0000 (+0300) Subject: #1347 Fatal error when rename group X-Git-Tag: V_2.2.0~31 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=524d51ded66fe5497c268bd32ce6ade8a99e17d3;p=modules%2Fshaper.git #1347 Fatal error when rename group --- diff --git a/src/XGUI/XGUI_OperationMgr.cpp b/src/XGUI/XGUI_OperationMgr.cpp index 533bb6adc..3e6c41223 100644 --- a/src/XGUI/XGUI_OperationMgr.cpp +++ b/src/XGUI/XGUI_OperationMgr.cpp @@ -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(); diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index ab326f3df..cb56c3879 100755 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -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())