From: sbh Date: Tue, 11 Nov 2014 10:06:02 +0000 (+0300) Subject: Issue #263 Check validity of the feature when filling it with pre-selection X-Git-Tag: V_0.5.1~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7f4c98675ad1ba70ff96acaa6d126ec840bdbca4;p=modules%2Fshaper.git Issue #263 Check validity of the feature when filling it with pre-selection --- diff --git a/src/ModuleBase/ModuleBase_Operation.cpp b/src/ModuleBase/ModuleBase_Operation.cpp index 565864eab..e906b9323 100644 --- a/src/ModuleBase/ModuleBase_Operation.cpp +++ b/src/ModuleBase/ModuleBase_Operation.cpp @@ -113,7 +113,7 @@ void ModuleBase_Operation::afterCommitOperation() bool ModuleBase_Operation::canBeCommitted() const { - return true; + return isValid(); } void ModuleBase_Operation::flushUpdated() diff --git a/src/PartSet/PartSet_OperationFeatureCreate.cpp b/src/PartSet/PartSet_OperationFeatureCreate.cpp index eed4d1ea4..8e18b6754 100644 --- a/src/PartSet/PartSet_OperationFeatureCreate.cpp +++ b/src/PartSet/PartSet_OperationFeatureCreate.cpp @@ -67,15 +67,6 @@ bool PartSet_OperationFeatureCreate::canProcessKind(const std::string& theId) || theId == SketchPlugin_ConstraintRigid::ID(); } -bool PartSet_OperationFeatureCreate::canBeCommitted() const -{ - if (PartSet_OperationSketchBase::canBeCommitted()) { - //if(myActiveWidget && !myActiveWidget->isComputedDefault()) { - return isValid(); - } - return false; -} - void PartSet_OperationFeatureCreate::mouseMoved(QMouseEvent* theEvent, ModuleBase_IViewer* theViewer) { double aX, anY; diff --git a/src/PartSet/PartSet_OperationFeatureCreate.h b/src/PartSet/PartSet_OperationFeatureCreate.h index bbc83f500..45e29505e 100644 --- a/src/PartSet/PartSet_OperationFeatureCreate.h +++ b/src/PartSet/PartSet_OperationFeatureCreate.h @@ -88,10 +88,6 @@ Q_OBJECT virtual FeaturePtr createFeature(const bool theFlushMessage = true, CompositeFeaturePtr theCompositeFeature = CompositeFeaturePtr()); - /// Verifies whether this operator can be commited. - /// \return Returns TRUE if current operation can be committed, e.g. all parameters are filled - virtual bool canBeCommitted() const; - protected: /// Feature of previous operation (for sequintal operations) FeaturePtr myInitFeature;