X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_Operation.cpp;h=bfe58446d370168a50092075ea228460c6ca7c25;hb=8b3ac2b938bd55064a6f260ca7ec9c9a84cd977e;hp=3b799f6689042bbb207297df4e76c9eaf8ec0732;hpb=6ee4c5c90f88523bd433b4a9660d0262bc0261f3;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_Operation.cpp b/src/ModuleBase/ModuleBase_Operation.cpp index 3b799f668..bfe58446d 100644 --- a/src/ModuleBase/ModuleBase_Operation.cpp +++ b/src/ModuleBase/ModuleBase_Operation.cpp @@ -66,6 +66,8 @@ bool ModuleBase_Operation::isValid() const { 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(); @@ -131,20 +133,6 @@ bool ModuleBase_Operation::hasObject(ObjectPtr theObj) const if (theObj == (*aIt)) return true; } - CompositeFeaturePtr aCompFeature = std::dynamic_pointer_cast(aFeature); - if (aCompFeature.get() != NULL) { - for (int i = 0; i < aCompFeature->numberOfSubs(); i++) { - FeaturePtr aSubFeature = aCompFeature->subFeature(i); - std::list aResults = aSubFeature->results(); - std::list::const_iterator aIt; - for (aIt = aResults.begin(); aIt != aResults.end(); ++aIt) { - if (theObj == (*aIt)) - return true; - } - if (aSubFeature == theObj) - return true; - } - } } return false; } @@ -158,7 +146,8 @@ std::shared_ptr ModuleBase_Operation::document() const void ModuleBase_Operation::start() { - ModelAPI_Session::get()->startOperation(); + QString anId = getDescription()->operationId(); + ModelAPI_Session::get()->startOperation(anId.toStdString()); if (!myIsEditing) createFeature();