myActiveViewManager( NULL ),
myPreviewViewManager( NULL ),
myShowGeomObjects( true ),
+ myShowLandCovers( false ),
myShowZones( false )
{
setName( myIsEdit ? tr( "EDIT_CALCULATION" ) : tr( "CREATE_CALCULATION" ) );
if ( !aPanel )
return;
+ setLandCoversVisible( true );
+
QStringList aList;
QStringList anEntryList;
HYDROData_SequenceOfObjects aSeq;
QApplication::setOverrideCursor( Qt::WaitCursor );
setGeomObjectsVisible( false );
-
+ setLandCoversVisible( false );
+
QString aNewCaseName = aPanel->getObjectName();
QString anOldCaseName = myEditedObject->GetName();
bool isNameChanged = anOldCaseName != aNewCaseName;
{
if( theIndex==1 )
{
+ setGeomObjectsVisible( true );
+
closePreview( false );
createPreview( false );
}
if( theIndex==2 )
{
+ setLandCoversVisible( true );
+
closePreview( false );
createPreview( true );
}
}
-void HYDROGUI_CalculationOp::AssignDefaultZonesColors( const bool theLandCover )
+void HYDROGUI_CalculationOp::setGeomObjectsVisible( bool theIsVisible )
{
myShowGeomObjects = theIsVisible;
}
}
+void HYDROGUI_CalculationOp::setLandCoversVisible( bool theIsVisible )
+{
+ myShowLandCovers = theIsVisible;
+
+ HYDROData_SequenceOfObjects aSeq = myEditedObject->GetLandCovers();
+
+ HYDROData_SequenceOfObjects::Iterator anIter( aSeq );
+ for ( ; anIter.More(); anIter.Next() ) {
+ setObjectVisibility( anIter.Value(), theIsVisible );
+ }
+}
+
+void HYDROGUI_CalculationOp::AssignDefaultZonesColors( const bool theLandCover )
{
HYDROData_SequenceOfObjects aRegions = myEditedObject->GetRegions( theLandCover );
HYDROData_SequenceOfObjects::Iterator aRegionsIter( aRegions );
{
LightApp_Application* anApp = module()->getApp();
HYDROData_SequenceOfObjects aSeq;
- if ( theLandCover )
- aSeq = myEditedObject->GetLandCovers();
- else
- aSeq = myEditedObject->GetGeometryObjects();
+ if ( theLandCover && myShowLandCovers )
+ {
+ HYDROData_SequenceOfObjects aSeqLC = myEditedObject->GetLandCovers();
+ aSeq.Append( aSeqLC );
}
+ else if ( !theLandCover && myShowGeomObjects )
+ {
+ HYDROData_SequenceOfObjects aSeqGO = myEditedObject->GetGeometryObjects();
+ aSeq.Append( aSeqGO );
+ }
+
Handle(HYDROData_Entity) anEntity;
if ( myShowZones )