: HYDROGUI_Operation( theModule ),
myIsEdit( theIsEdit ),
myActiveViewManager( NULL ),
- myPreviewViewManager( NULL )
+ myPreviewViewManager( NULL ),
+ myShowGeomObjects( true ),
+ myShowZones( false )
{
setName( myIsEdit ? tr( "EDIT_CALCULATION" ) : tr( "CREATE_CALCULATION" ) );
}
connect( aPanel, SIGNAL( removeGroups() ), SLOT( onRemoveGroups() ) );
connect( aPanel, SIGNAL( orderChanged( bool& ) ), SLOT( onOrderChanged( bool& ) ) );
connect( aPanel, SIGNAL( Next( const int ) ), SLOT( onNext( const int ) ) );
- connect( aPanel, SIGNAL( Back( const int ) ), SLOT( onHideZones() ) );
+ connect( aPanel, SIGNAL( Back( const int ) ), SLOT( onBack( const int ) ) );
//connect( aPanel, SIGNAL( clicked( SUIT_DataObject* ) ), SLOT( onSelected( SUIT_DataObject* ) ) );
connect( aPanel, SIGNAL( setMergeType( int, QString& ) ), SLOT( onSetMergeType( int, QString& ) ) );
connect( aPanel, SIGNAL( moveZones( SUIT_DataObject*, const QList<SUIT_DataObject*>& ) ),
return;
QApplication::setOverrideCursor( Qt::WaitCursor );
+
+ setGeomObjectsVisible( false );
QString aNewCaseName = aPanel->getObjectName();
QString anOldCaseName = myEditedObject->GetName();
}
}
-void HYDROGUI_CalculationOp::onHideZones()
+void HYDROGUI_CalculationOp::onBack( const int theIndex )
{
+ setGeomObjectsVisible( theIndex != 2 );
setZonesVisible( false );
}
}
}
+void HYDROGUI_CalculationOp::setGeomObjectsVisible( bool theIsVisible )
+{
+ myShowGeomObjects = theIsVisible;
+
+ HYDROData_SequenceOfObjects aSeq = myEditedObject->GetGeometryObjects();
+
+ HYDROData_SequenceOfObjects::Iterator anIter( aSeq );
+ for ( ; anIter.More(); anIter.Next() ) {
+ setObjectVisibility( anIter.Value(), theIsVisible );
+ }
+}
+
void HYDROGUI_CalculationOp::AssignDefaultZonesColors()
{
HYDROData_SequenceOfObjects aRegions = myEditedObject->GetRegions();
void HYDROGUI_CalculationOp::createPreview()
{
LightApp_Application* anApp = module()->getApp();
- HYDROData_SequenceOfObjects aSeq = myEditedObject->GetGeometryObjects();
+ HYDROData_SequenceOfObjects aSeq;
+ if ( myShowGeomObjects ) {
+ aSeq.Append( myEditedObject->GetGeometryObjects() );
+ }
Handle(HYDROData_Entity) anEntity;
if ( myShowZones )
*/
void onClickedInZonesBrowser( SUIT_DataObject* theItem );
/**
- * Hide zones in the viewer.
+ * Slot called on back button click.
*/
- void onHideZones();
+ void onBack( const int );
/**
* Geometry object is selected in the list on the first wizard page
*/
void closePreview();
void setObjectVisibility( Handle(HYDROData_Entity) theEntity, const bool theIsVisible );
void setZonesVisible( bool theIsVisible );
+ void setGeomObjectsVisible( bool theIsVisible );
void getNamesAndEntries( const HYDROData_SequenceOfObjects& theSeq,
QStringList& theNames, QStringList& theEntries ) const;
private:
bool myIsEdit;
bool myShowZones;
+ bool myShowGeomObjects;
Handle(HYDROData_CalculationCase) myEditedObject;
SUIT_ViewManager* myActiveViewManager;