From 302904f8788a5969a428dc931c3f02374f3fbe06 Mon Sep 17 00:00:00 2001 From: isn Date: Wed, 24 Jun 2015 17:18:04 +0300 Subject: [PATCH] new resources; bug fixes; etc --- src/HYDROGUI/HYDROGUI_ImportLandCoverDlg.cxx | 6 ++-- src/HYDROGUI/HYDROGUI_ImportLandcoverOp.cxx | 17 +++++++++ src/HYDROGUI/resources/HYDROGUI_msg_en.ts | 37 +++++++++++++++++--- 3 files changed, 52 insertions(+), 8 deletions(-) diff --git a/src/HYDROGUI/HYDROGUI_ImportLandCoverDlg.cxx b/src/HYDROGUI/HYDROGUI_ImportLandCoverDlg.cxx index 213f8c75..40a4b721 100644 --- a/src/HYDROGUI/HYDROGUI_ImportLandCoverDlg.cxx +++ b/src/HYDROGUI/HYDROGUI_ImportLandCoverDlg.cxx @@ -36,7 +36,7 @@ HYDROGUI_ImportLandCoverDlg::HYDROGUI_ImportLandCoverDlg( HYDROGUI_Module* theMo myFileNameGroup = new QGroupBox( tr( "IMPORT_LANDCOVER_FROM_FILE" ) ); - QLabel* aFileNameLabel = new QLabel( tr( "LANCOVER_NAME" ), myFileNameGroup ); + QLabel* aFileNameLabel = new QLabel( tr( "FILE_NAME" ), myFileNameGroup ); myFileName = new QLineEdit( myFileNameGroup ); myFileName->setReadOnly( true ); @@ -51,7 +51,7 @@ HYDROGUI_ImportLandCoverDlg::HYDROGUI_ImportLandCoverDlg( HYDROGUI_Module* theMo aFileNameLayout->addWidget( myFileName ); aFileNameLayout->addWidget( aBrowseBtn ); - myObjectNameGroup = new QGroupBox( tr( "FILE_NAME" ) ); + myObjectNameGroup = new QGroupBox( tr( "LANDCOVER_NAME" ) ); QLabel* aLandcoverNameLabel = new QLabel( tr( "NAME" ), myObjectNameGroup ); myObjectName = new QLineEdit( myObjectNameGroup ); @@ -62,7 +62,7 @@ HYDROGUI_ImportLandCoverDlg::HYDROGUI_ImportLandCoverDlg( HYDROGUI_Module* theMo aLandcoverNameLayout->addWidget( aLandcoverNameLabel ); aLandcoverNameLayout->addWidget( myObjectName ); - QGroupBox* aPolygonsGroup = new QGroupBox( tr( "FOUND_POLYGONS_OF_SHP_FILE" ), mainFrame() ); + QGroupBox* aPolygonsGroup = new QGroupBox( tr( "FOUNDED_POLYGONS" ), mainFrame() ); myPolygons = new QListWidget( aPolygonsGroup ); myPolygons->setSelectionMode( QListWidget::ExtendedSelection ); myPolygons->setEditTriggers( QListWidget::NoEditTriggers ); diff --git a/src/HYDROGUI/HYDROGUI_ImportLandcoverOp.cxx b/src/HYDROGUI/HYDROGUI_ImportLandcoverOp.cxx index bad1844c..79179eb3 100644 --- a/src/HYDROGUI/HYDROGUI_ImportLandcoverOp.cxx +++ b/src/HYDROGUI/HYDROGUI_ImportLandcoverOp.cxx @@ -84,6 +84,23 @@ HYDROGUI_ImportLandCoverOp::~HYDROGUI_ImportLandCoverOp() void HYDROGUI_ImportLandCoverOp::startOperation() { HYDROGUI_Operation::startOperation(); + + if ( !getPreviewManager() ) { + setPreviewManager( ::qobject_cast( + module()->getApp()->getViewManager( OCCViewer_Viewer::Type(), true ) ) ); + } + + if ( !isApplyAndClose() ) { + return; + } + + HYDROGUI_ImportLandCoverDlg* aPanel = + ::qobject_cast( inputPanel() ); + if ( !aPanel ) { + return; + } + + aPanel->reset(); } diff --git a/src/HYDROGUI/resources/HYDROGUI_msg_en.ts b/src/HYDROGUI/resources/HYDROGUI_msg_en.ts index 2353cfe9..8f1d48b0 100644 --- a/src/HYDROGUI/resources/HYDROGUI_msg_en.ts +++ b/src/HYDROGUI/resources/HYDROGUI_msg_en.ts @@ -2192,14 +2192,30 @@ file cannot be correctly imported for an Obstacle definition. HYDROGUI_ImportLandCoverDlg - - IMPORT_LANDCOVER - Import Land cover - LANDCOVER_FILTER Shape files (*.shp) + + IMPORT_LANDCOVER_FROM_FILE + Import land cover from file + + + FILE_NAME + File name + + + LANDCOVER_NAME + Land cover name + + + NAME + name: + + + FOUNDED_POLYGONS + Founded polygons: + BAD_IMPORTED_LANDCOVER_FILES Land cover import error @@ -2210,7 +2226,18 @@ file cannot be correctly imported for an Obstacle definition. - + + HYDROGUI_ImportLandCoverOp + + IMPORT_LANDCOVER + Import land cover + + + DEFAULT_LANDCOVER_NAME + Landcover_0 + + + HYDROGUI_ImportSinusXOp -- 2.39.2