From: mpv Date: Mon, 15 Sep 2014 07:42:15 +0000 (+0400) Subject: Tuning the python console commands execution X-Git-Tag: V_0.4.4~58 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=99e20e519d7b21a9bb2cf3c9c388c31d15ca675c;p=modules%2Fshaper.git Tuning the python console commands execution --- diff --git a/src/Model/Model_Document.cpp b/src/Model/Model_Document.cpp index 7a2ca8542..cb5d28394 100644 --- a/src/Model/Model_Document.cpp +++ b/src/Model/Model_Document.cpp @@ -417,6 +417,9 @@ FeaturePtr Model_Document::addFeature(std::string theID) // event: feature is added static Events_ID anEvent = Events_Loop::eventByName(EVENT_OBJECT_CREATED); ModelAPI_EventCreator::get()->sendUpdated(aFeature, anEvent); + } else { // feature must be executed + // no creation event => updater not working, problem with remove part + aFeature->execute(); } } return aFeature; diff --git a/src/ModelAPI/ModelAPI.i b/src/ModelAPI/ModelAPI.i index c8fddd2f8..dd78318e0 100644 --- a/src/ModelAPI/ModelAPI.i +++ b/src/ModelAPI/ModelAPI.i @@ -20,6 +20,8 @@ #include "ModelAPI_AttributeRefList.h" #include "ModelAPI_Result.h" #include "ModelAPI_ResultConstruction.h" + #include "ModelAPI_ResultBody.h" + #include "ModelAPI_ResultPart.h" template boost::shared_ptr castTo(boost::shared_ptr theObject) { @@ -58,6 +60,8 @@ %shared_ptr(ModelAPI_AttributeRefList) %shared_ptr(ModelAPI_Result) %shared_ptr(ModelAPI_ResultConstruction) +%shared_ptr(ModelAPI_ResultBody) +%shared_ptr(ModelAPI_ResultPart) // all supported interfaces %include "GeomAPI_Interface.h" @@ -78,9 +82,13 @@ %include "ModelAPI_AttributeRefList.h" %include "ModelAPI_Result.h" %include "ModelAPI_ResultConstruction.h" +%include "ModelAPI_ResultBody.h" +%include "ModelAPI_ResultPart.h" %template(ObjectList) std::list >; %template(ResultList) std::list >; template boost::shared_ptr castTo(boost::shared_ptr theObject); %template(modelAPI_ResultConstruction) castTo; +%template(modelAPI_ResultBody) castTo; +%template(modelAPI_ResultPart) castTo; diff --git a/src/ModelAPI/ModelAPI_Validator.h b/src/ModelAPI/ModelAPI_Validator.h index f4ecd1923..9c83a9d7e 100644 --- a/src/ModelAPI/ModelAPI_Validator.h +++ b/src/ModelAPI/ModelAPI_Validator.h @@ -29,13 +29,6 @@ class MODELAPI_EXPORT ModelAPI_Validator virtual ~ModelAPI_Validator() { } - - /// Returns true if feature and/or attributes are valid - /// \param theFeature the validated feature - /// \param theAttr the validated attribute ID, empty string of feature is validated - /// \param theArguments list of string, feature attribute names: dependent attributes - //virtual bool validate(const boost::shared_ptr& theFeature, - // const std::string theAttr, std::list theArguments) const = 0; }; typedef boost::shared_ptr ValidatorPtr;