]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
Forsed update of objects corrected (Bug #284).
authoradv <adv@opencascade.com>
Wed, 25 Dec 2013 14:01:30 +0000 (14:01 +0000)
committeradv <adv@opencascade.com>
Wed, 25 Dec 2013 14:01:30 +0000 (14:01 +0000)
src/HYDROGUI/HYDROGUI_Operations.cxx
src/HYDROGUI/HYDROGUI_UpdateObjectOp.cxx
src/HYDROGUI/HYDROGUI_UpdateObjectOp.h

index 95fb864d8180f2e9b39c4810a0e4425e217019de..d2a7d3f42c665707dd0988b5a77939f3066202db 100644 (file)
@@ -392,7 +392,7 @@ LightApp_Operation* HYDROGUI_Module::createOperation( const int theId ) const
     break;
   case UpdateObjectId:
   case ForcedUpdateObjectId:
-    anOp = new HYDROGUI_UpdateObjectOp( aModule );
+    anOp = new HYDROGUI_UpdateObjectOp( aModule, theId == ForcedUpdateObjectId );
     break;
   case RemoveImageRefsId:
     anOp = new HYDROGUI_RemoveImageRefsOp( aModule );
index c653c10757f24ff15eec887d00aecca459f8fc69..40af609bace836c22986b82a07c87746e40fe2b1 100644 (file)
 #include <HYDROData_Document.h>
 #include <HYDROData_Image.h>
 
-HYDROGUI_UpdateObjectOp::HYDROGUI_UpdateObjectOp( HYDROGUI_Module* theModule )
-: HYDROGUI_Operation( theModule )
+HYDROGUI_UpdateObjectOp::HYDROGUI_UpdateObjectOp( HYDROGUI_Module* theModule,
+                                                  const bool       theIsForced )
+: HYDROGUI_Operation( theModule ),
+  myIsForced( theIsForced )
 {
   setName( tr( "UPDATE_IMAGE" ) );
 }
@@ -75,7 +77,7 @@ void HYDROGUI_UpdateObjectOp::updateObject( const Handle(HYDROData_Entity)& theO
     updateObject( anObject, theMapOfTreated );
   }
 
-  if ( !theObject->IsMustBeUpdated() )
+  if ( !myIsForced && !theObject->IsMustBeUpdated() )
     return;
 
   theObject->Update();
index 735b01bfe94aa625ecc60a602d14c839bfaa0a2b..8f9a65d723c411be8807e96bcce3daafd9181609 100644 (file)
@@ -34,7 +34,8 @@ class HYDROGUI_UpdateObjectOp : public HYDROGUI_Operation
   Q_OBJECT
 
 public:
-  HYDROGUI_UpdateObjectOp( HYDROGUI_Module* theModule );
+  HYDROGUI_UpdateObjectOp( HYDROGUI_Module* theModule,
+                           const bool       theIsForced );
   virtual ~HYDROGUI_UpdateObjectOp();
 
 protected:
@@ -43,6 +44,9 @@ protected:
 
   virtual void               updateObject( const Handle_HYDROData_Entity& theObject,
                                            NCollection_Map<Handle(HYDROData_Entity)>& theMapOfTreated  ) const;
+
+private:
+  bool                       myIsForced;
 };
 
 #endif