if (!aNewP->partDoc().get())
// create the part result: it is better to restore the previous result if it is possible
theFeature->execute();
- break;
} else if (aGroup->Get() == ModelAPI_ResultConstruction::group().c_str()) {
theFeature->execute(); // construction shapes are needed for sketch solver
- break;
} else if (aGroup->Get() == ModelAPI_ResultGroup::group().c_str()) {
aNewBody = createGroup(theFeature->data(), aResIndex);
} else if (aGroup->Get() == ModelAPI_ResultField::group().c_str()) {
aNewBody = createField(theFeature->data(), aResIndex);
} else if (aGroup->Get() == ModelAPI_ResultParameter::group().c_str()) {
theFeature->attributeChanged("expression"); // just produce a value
- break;
} else {
Events_InfoMessage("Model_Objects", "Unknown type of result is found in the document:")
.arg(TCollection_AsciiString(aGroup->Get()).ToCString()).send();
myResults.push_back(theResult);
}
// in any case result becomes enabled
- theResult->setDisabled(theResult, false);
+ if (!isDisabled()) // disabled feature may be executed when it is added as not enabled (#2078)
+ theResult->setDisabled(theResult, false);
}
void ModelAPI_Feature::setResult(const std::shared_ptr<ModelAPI_Result>& theResult,