X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FPartSet%2FPartSet_SketcherReetntrantMgr.h;h=81f3433f8fbdded25b15605492f7c4a57df9d244;hb=023c72db1a0c06efe73559cc2ff37c841842823a;hp=8f16bce6d11466442d314a9873fdb7f657d0856b;hpb=1d23063e3fd8241ef440f0de41d12a03c669aff7;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_SketcherReetntrantMgr.h b/src/PartSet/PartSet_SketcherReetntrantMgr.h index 8f16bce6d..81f3433f8 100755 --- a/src/PartSet/PartSet_SketcherReetntrantMgr.h +++ b/src/PartSet/PartSet_SketcherReetntrantMgr.h @@ -16,6 +16,8 @@ class ModuleBase_Operation; class ModuleBase_ModelWidget; class ModuleBase_IViewWindow; +class ModelAPI_CompositeFeature; + class QMouseEvent; class XGUI_Workshop; @@ -42,7 +44,7 @@ enum RestartingMode { public: /// Constructor - /// \param theParent a parent object + /// \param theWorkshop a workshop instance PartSet_SketcherReetntrantMgr(ModuleBase_IWorkshop* theWorkshop); virtual ~PartSet_SketcherReetntrantMgr(); @@ -54,6 +56,9 @@ public: /// Return true if the current edit operation is an internal bool isInternalEditActive() const; + /// Stop internal edit if the operation feature is invalid + void updateInternalEditActiveState(); + /// if the internal flags allow it and the manager is active, it starts an internal edit operation /// for the created operation. /// \param thePreviousAttributeID an index of the previous active attribute @@ -94,6 +99,10 @@ public: /// Returns false if the reentrant mode of the operation is not empty. bool canBeCommittedByPreselection(); + /// returns true if an internal edit operation is started + /// \return boolean value + bool isInternalEditStarted() const; + private slots: /// SLOT, that is called by a widget activating in the property panel /// If the 'internal' edit operation is started, it activates the first widget selection @@ -143,9 +152,20 @@ private: /// This is type for Circle and Arc features /// \param theSourceFeature a source feature /// \param theNewFeature a new feature + /// \param theSketch an active sketch + /// \param isTemporary is used to do not create additional features(e.g. coicidence for line) /// \return true is something is copied static bool copyReetntrantAttributes(const FeaturePtr& theSourceFeature, - const FeaturePtr& theNewFeature); + const FeaturePtr& theNewFeature, + const std::shared_ptr& theSketch, + const bool isTemporary = false); + + /// Checks whethe the feature of the given operation has kind an arc and the arc type is tangent + static bool isTangentArc(ModuleBase_Operation* theOperation, + const std::shared_ptr& theSketch); + + /// Accept All action is enabled if an internal edit is started. It updates the state of the button + void updateAcceptAllAction(); /// Returns the workshop XGUI_Workshop* workshop() const; @@ -160,6 +180,7 @@ private: bool myIsFlagsBlocked; /// true when reset of flags should not be perfromed bool myIsInternalEditOperation; /// true when the 'internal' edit is started + FeaturePtr myPreviousFeature; /// feature of the previous operation, which is restarted FeaturePtr myInternalFeature; QWidget* myInternalWidget; ModuleBase_ModelWidget* myInternalActiveWidget;