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 );
#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" ) );
}
updateObject( anObject, theMapOfTreated );
}
- if ( !theObject->IsMustBeUpdated() )
+ if ( !myIsForced && !theObject->IsMustBeUpdated() )
return;
theObject->Update();
Q_OBJECT
public:
- HYDROGUI_UpdateObjectOp( HYDROGUI_Module* theModule );
+ HYDROGUI_UpdateObjectOp( HYDROGUI_Module* theModule,
+ const bool theIsForced );
virtual ~HYDROGUI_UpdateObjectOp();
protected:
virtual void updateObject( const Handle_HYDROData_Entity& theObject,
NCollection_Map<Handle(HYDROData_Entity)>& theMapOfTreated ) const;
+
+private:
+ bool myIsForced;
};
#endif