#include <HYDROData_Document.h>
#include <HYDROData_Image.h>
-#include <HYDROOperations_Factory.h>
-
HYDROGUI_UpdateImageOp::HYDROGUI_UpdateImageOp( HYDROGUI_Module* theModule )
: HYDROGUI_Operation( theModule )
{
startDocOperation();
HYDROData_SequenceOfObjects aSeq = HYDROGUI_Tool::GetSelectedObjects( module() );
- for( Standard_Integer anIndex = 1, aLength = aSeq.Length(); anIndex <= aLength; anIndex++ )
+ for( int anIndex = 1, aLength = aSeq.Length(); anIndex <= aLength; anIndex++ )
{
Handle(HYDROData_Image) anImage =
Handle(HYDROData_Image)::DownCast( aSeq.Value( anIndex ) );
- if( !anImage.IsNull() && anImage->MustBeUpdated() )
- {
- HYDROOperations_Factory* aFactory = HYDROOperations_Factory::Factory();
- aFactory->UpdateImage( doc(), anImage );
- }
+ if( !anImage.IsNull() && anImage->IsMustBeUpdated() )
+ anImage->Update();
}
commitDocOperation();
- module()->update( UF_Model | UF_Viewer | UF_GV_Forced );
+ module()->update( UF_Model | UF_Viewer | UF_GV_Forced | UF_OCCViewer | UF_OCC_Forced );
commit();
}