addStretch();
+ // Connect signals and slots
+ connect( myObjectNameEdit, SIGNAL( currentIndexChanged( int ) ), this, SLOT( onLandCoverMapChanged() ) );
connect( myPolylinesFaces, SIGNAL( objectSelected( const QString& ) ), this, SLOT( onPolylineFaceChanged( const QString& ) ) );
updateState( true );
+
}
HYDROGUI_LandCoverMapDlg::~HYDROGUI_LandCoverMapDlg()
myOperationId == SplitLandCoverId ) ) );
}
+void HYDROGUI_LandCoverMapDlg::onLandCoverMapChanged()
+{
+ if ( signalsBlocked() )
+ return;
+
+ reset();
+
+ emit landCoverMapChanged( getObjectName() );
+}
+
void HYDROGUI_LandCoverMapDlg::onPolylineFaceChanged( const QString& )
{
updateState();
anEmptyPolylineFaceName = getPolylineFaceName().isEmpty();
setApplyEnabled( !anEmptyObjectName && !anEmptyPolylineFaceName );
+
+ // TODO:
+ //if ( myOperationId == RemoveLandCoverId || myOperationId == MergeLandCoverId ) => enable Apply,
+ //Apply and Close buttons only if at least one face (land cover) is selected in the 3d viewer
}
}