Salome HOME
debug of DTM object
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_LandCoverMapDlg.cxx
index 565b678f5d72c2b02257116cec95654175639007..2e11ce1e0e9cffc065389d9e2f0307340c22be09 100644 (file)
 #include <HYDROData_Object.h>
 #include <HYDROData_PolylineXY.h>
 
+#include <OCCViewer_ViewManager.h>
+
+#include <LightApp_Application.h>
+#include <LightApp_SelectionMgr.h>
+#include <LightApp_DataOwner.h>
+
+#include <SUIT_DataObject.h>
+
 #include <QLineEdit>
 #include <QComboBox>
 #include <QGroupBox>
@@ -82,7 +90,7 @@ HYDROGUI_LandCoverMapDlg::HYDROGUI_LandCoverMapDlg( HYDROGUI_Module* theModule,
 
   // Connect signals and slots
   connect( myObjectNameEdit, SIGNAL( currentIndexChanged( int ) ), this, SLOT( onLandCoverMapChanged() ) );
-  connect( myPolylinesFaces, SIGNAL( objectSelected( const QString& ) ), this, SLOT( onPolylineFaceChanged( const QString& ) ) );
+  connect( myPolylinesFaces, SIGNAL( objectSelected( const QString& ) ), this, SLOT( onPolylineFaceChanged() ) );
 
   updateState( true );
 
@@ -119,6 +127,8 @@ void HYDROGUI_LandCoverMapDlg::setObjectName( const QString& theName )
     myObjectNameCreate->setText( theName );
   else
     myObjectNameEdit->setCurrentIndex( myObjectNameEdit->findText( theName ) );
+
+  updateState();
 }
 
 QString HYDROGUI_LandCoverMapDlg::getObjectName() const
@@ -174,10 +184,11 @@ void HYDROGUI_LandCoverMapDlg::onLandCoverMapChanged()
   emit landCoverMapChanged( getObjectName() );
 }
 
-void HYDROGUI_LandCoverMapDlg::onPolylineFaceChanged( const QString& )
+void HYDROGUI_LandCoverMapDlg::onPolylineFaceChanged()
 {
   updateState();
-  // TODO: select chosen polyline/face in the 3D viewer, if it is not selected yet (i.e. object was chosen not in the viewer, but in combo-box)
+
+  emit polylineFaceChanged();
 }
 
 void HYDROGUI_LandCoverMapDlg::updateState( bool theInitialConfigure )