X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROGUI%2FHYDROGUI_CalculationOp.cxx;h=3dab9422c0eb0fecebb2a2df68669719be3c1248;hb=5cae7e874afd2fc1b6f61023e8ebd33a933db3c7;hp=f36ac726fec8dc87146b20666bef95ce448cb879;hpb=e709575f75fcabe5b0d538c54d7c867369ce70ea;p=modules%2Fhydro.git diff --git a/src/HYDROGUI/HYDROGUI_CalculationOp.cxx b/src/HYDROGUI/HYDROGUI_CalculationOp.cxx index f36ac726..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