From: adv Date: Wed, 25 Dec 2013 14:01:30 +0000 (+0000) Subject: Forsed update of objects corrected (Bug #284). X-Git-Tag: BR_hydro_v_0_7~60 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9c57d510e5cf3a97f10c93467a5ed78fb9bedc48;p=modules%2Fhydro.git Forsed update of objects corrected (Bug #284). --- diff --git a/src/HYDROGUI/HYDROGUI_Operations.cxx b/src/HYDROGUI/HYDROGUI_Operations.cxx index 95fb864d..d2a7d3f4 100644 --- a/src/HYDROGUI/HYDROGUI_Operations.cxx +++ b/src/HYDROGUI/HYDROGUI_Operations.cxx @@ -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 ); diff --git a/src/HYDROGUI/HYDROGUI_UpdateObjectOp.cxx b/src/HYDROGUI/HYDROGUI_UpdateObjectOp.cxx index c653c107..40af609b 100644 --- a/src/HYDROGUI/HYDROGUI_UpdateObjectOp.cxx +++ b/src/HYDROGUI/HYDROGUI_UpdateObjectOp.cxx @@ -29,8 +29,10 @@ #include #include -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(); diff --git a/src/HYDROGUI/HYDROGUI_UpdateObjectOp.h b/src/HYDROGUI/HYDROGUI_UpdateObjectOp.h index 735b01bf..8f9a65d7 100644 --- a/src/HYDROGUI/HYDROGUI_UpdateObjectOp.h +++ b/src/HYDROGUI/HYDROGUI_UpdateObjectOp.h @@ -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& theMapOfTreated ) const; + +private: + bool myIsForced; }; #endif