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();
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())