]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #263 Check validity of the feature when filling it with pre-selection
authorsbh <sergey.belash@opencascade.com>
Tue, 11 Nov 2014 10:06:02 +0000 (13:06 +0300)
committersbh <sergey.belash@opencascade.com>
Tue, 11 Nov 2014 10:06:02 +0000 (13:06 +0300)
src/ModuleBase/ModuleBase_Operation.cpp
src/PartSet/PartSet_OperationFeatureCreate.cpp
src/PartSet/PartSet_OperationFeatureCreate.h

index 565864eab3fcd552379e057bba482d8e9a219b4e..e906b93233b4d133af8559521507554c0cb887f4 100644 (file)
@@ -113,7 +113,7 @@ void ModuleBase_Operation::afterCommitOperation()
 
 bool ModuleBase_Operation::canBeCommitted() const
 {
-  return true;
+  return isValid();
 }
 
 void ModuleBase_Operation::flushUpdated()
index eed4d1ea4781f696a19c0e342dc777137d883fed..8e18b675442ca79174d1f9a4c1411d021253f06c 100644 (file)
@@ -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;
index bbc83f5007c9143d6b61abfac82c4eae195c9870..45e29505ef74d6b4a3d41867f2811d189e76a218 100644 (file)
@@ -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;