X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROGUI%2FHYDROGUI_CalculationOp.cxx;h=3dab9422c0eb0fecebb2a2df68669719be3c1248;hb=5cae7e874afd2fc1b6f61023e8ebd33a933db3c7;hp=552f6841ec1c1379a0a81ed103104afe5f791f78;hpb=104fb853e59d3f22d9ff8fcfd9d93257e7ad0398;p=modules%2Fhydro.git diff --git a/src/HYDROGUI/HYDROGUI_CalculationOp.cxx b/src/HYDROGUI/HYDROGUI_CalculationOp.cxx index 552f6841..3dab9422 100644 --- a/src/HYDROGUI/HYDROGUI_CalculationOp.cxx +++ b/src/HYDROGUI/HYDROGUI_CalculationOp.cxx @@ -27,6 +27,7 @@ #include "HYDROGUI_Module.h" #include "HYDROGUI_Tool.h" #include "HYDROGUI_UpdateFlags.h" +#include "HYDROGUI_Zone.h" #include #include @@ -149,10 +150,27 @@ HYDROGUI_InputPanel* HYDROGUI_CalculationOp::createInputPanel() const connect( aPanel, SIGNAL( addObjects() ), SLOT( onAddObjects() ) ); connect( aPanel, SIGNAL( removeObjects() ), SLOT( onRemoveObjects() ) ); connect( aPanel, SIGNAL( splitZones() ), SLOT( onSplitZones() ) ); + connect( aPanel, SIGNAL( clicked( SUIT_DataObject* ) ), SLOT( onSelected( SUIT_DataObject* ) ) ); + connect( aPanel, SIGNAL( setMergeType( int, QString ) ), SLOT( onSetMergeType( int, QString ) ) ); return aPanel; } +void HYDROGUI_CalculationOp::onSetMergeType( int theMergeType, QString theBathymetryName ) +{ + HYDROGUI_CalculationDlg* aPanel = + ::qobject_cast( inputPanel() ); + if ( aPanel ) + { + HYDROGUI_Zone* aZone = aPanel->getCurrentZone(); + if ( aZone ) + { + aZone->setMergeType( theMergeType, theBathymetryName ); + } + aPanel->refreshZonesBrowser(); + } +} + void HYDROGUI_CalculationOp::onAddObjects() { // Add geometry objects selected in the module browser to the calculation case @@ -338,6 +356,7 @@ void HYDROGUI_CalculationOp::onSplitZones() // myEditedObject->SplitGeometryObjects(); + aPanel->setEditedObject( myEditedObject ); createPreview(); QApplication::restoreOverrideCursor();