#include "HYDROGUI_Module.h"
#include "HYDROGUI_Prs.h"
#include "HYDROGUI_PrsImageDriver.h"
+#include "HYDROGUI_PrsPolylineDriver.h"
+#include "HYDROGUI_PrsZoneDriver.h"
#include "HYDROGUI_Tool.h"
#include <GraphicsView_Viewer.h>
void HYDROGUI_Displayer::DisplayAll( const int theViewerId,
const bool theIsForced )
{
- HYDROGUI_DataModel* aModel = (HYDROGUI_DataModel*)myModule->dataModel();
- if( aModel )
- {
- HYDROData_SequenceOfObjects aSeq;
- HYDROGUI_Tool::GetPrsSubObjects( aModel, theViewerId, aSeq );
- Update( aSeq, theViewerId, theIsForced );
- }
+ HYDROData_SequenceOfObjects aSeq;
+ HYDROGUI_Tool::GetPrsSubObjects( myModule, aSeq );
+ Update( aSeq, theViewerId, theIsForced );
}
void HYDROGUI_Displayer::Update( const HYDROData_SequenceOfObjects& theObjs,
if( aPrs )
{
- bool anIsVisible = anObj->GetVisibility();
+ bool anIsVisible = myModule->isObjectVisible( (size_t)aViewer, anObj );
aPrs->setVisible( anIsVisible );
}
}
+ aViewPort->onBoundingRectChanged(); // specific of HYDRO module
aViewPort->fitAll();
}
{
case KIND_IMAGE:
aDriver = new HYDROGUI_PrsImageDriver();
- myPrsDriversMap[ aKind ] = aDriver;
+ break;
+ case KIND_POLYLINE:
+ aDriver = new HYDROGUI_PrsPolylineDriver();
+ break;
+ case KIND_ZONE:
+ aDriver = new HYDROGUI_PrsZoneDriver();
break;
default:
break;
}
+
+ if ( aDriver )
+ myPrsDriversMap[ aKind ] = aDriver;
}
+
return aDriver;
}