{
if (!myFeature)
return true; // rename operation
+ if (myFeature->isAction())
+ return true;
//Get validators for the Id
SessionPtr aMgr = ModelAPI_Session::get();
ModelAPI_ValidatorsFactory* aFactory = aMgr->validators();
FeaturePtr ModuleBase_Operation::createFeature(const bool theFlushMessage)
{
- if (myParentFeature) {
+ if (myParentFeature.get()) {
myFeature = myParentFeature->addFeature(getDescription()->operationId().toStdString());
} else {
std::shared_ptr<ModelAPI_Document> aDoc = document();
void ModuleBase_Operation::start()
{
- ModelAPI_Session::get()->startOperation();
+ QString anId = getDescription()->operationId();
+ ModelAPI_Session::get()->startOperation(anId.toStdString());
if (!myIsEditing)
createFeature();
}
+void ModuleBase_Operation::setParentFeature(CompositeFeaturePtr theParent)
+{
+ myParentFeature = theParent;
+}
+
+CompositeFeaturePtr ModuleBase_Operation::parentFeature() const
+{
+ return myParentFeature;
+}
+
void ModuleBase_Operation::initSelection(ModuleBase_ISelection* theSelection,
ModuleBase_IViewer* theViewer)
{