]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
new resources; bug fixes; etc
authorisn <isn@opencascade.com>
Wed, 24 Jun 2015 14:18:04 +0000 (17:18 +0300)
committerisn <isn@opencascade.com>
Wed, 24 Jun 2015 15:30:11 +0000 (18:30 +0300)
src/HYDROGUI/HYDROGUI_ImportLandCoverDlg.cxx
src/HYDROGUI/HYDROGUI_ImportLandcoverOp.cxx
src/HYDROGUI/resources/HYDROGUI_msg_en.ts

index 213f8c751de0cbb16f639b07b26725b7b07d9e9c..40a4b72146ab32f9d2adea71609f5ddbb78e9987 100644 (file)
@@ -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 );
index bad1844c170260e63ed3e3c37050776c59ead81e..79179eb31500dd7aa075eb3954f6ec2ea83bb4ed 100644 (file)
@@ -84,6 +84,23 @@ HYDROGUI_ImportLandCoverOp::~HYDROGUI_ImportLandCoverOp()
 void HYDROGUI_ImportLandCoverOp::startOperation()
 {
   HYDROGUI_Operation::startOperation();
+
+  if ( !getPreviewManager() ) {
+    setPreviewManager( ::qobject_cast<OCCViewer_ViewManager*>( 
+                       module()->getApp()->getViewManager( OCCViewer_Viewer::Type(), true ) ) );
+  }
+
+  if ( !isApplyAndClose() ) {
+    return;
+  }
+
+  HYDROGUI_ImportLandCoverDlg* aPanel = 
+    ::qobject_cast<HYDROGUI_ImportLandCoverDlg*>( inputPanel() );
+  if ( !aPanel ) {
+    return;
+  }
+
+  aPanel->reset();
 }
 
 
index 2353cfe96b90728753b8de46cd08f5e0bb60cab1..8f1d48b08da6a4d0a3b47f39b97f97499b9a3b99 100644 (file)
@@ -2192,14 +2192,30 @@ file cannot be correctly imported for an Obstacle definition.</translation>
 
  <context>
     <name>HYDROGUI_ImportLandCoverDlg</name>
-    <message>
-      <source>IMPORT_LANDCOVER</source>
-      <translation>Import Land cover</translation>
-    </message>
     <message>
       <source>LANDCOVER_FILTER</source>
       <translation>Shape files (*.shp)</translation>
     </message>
+    <message>
+      <source>IMPORT_LANDCOVER_FROM_FILE</source>
+      <translation>Import land cover from file</translation>
+    </message>
+    <message>
+      <source>FILE_NAME</source>
+      <translation>File name</translation>
+    </message>
+    <message>
+      <source>LANDCOVER_NAME</source>
+      <translation>Land cover name</translation>
+    </message>
+    <message>
+      <source>NAME</source>
+      <translation>name:</translation>
+    </message>
+    <message>
+      <source>FOUNDED_POLYGONS</source>
+      <translation>Founded polygons:</translation>
+    </message>
     <message>
       <source>BAD_IMPORTED_LANDCOVER_FILES</source>
       <translation>Land cover import error</translation>
@@ -2210,7 +2226,18 @@ file cannot be correctly imported for an Obstacle definition.</translation>
     </message>
   </context>
 
-
+  <context>
+    <name>HYDROGUI_ImportLandCoverOp</name>
+    <message>
+      <source>IMPORT_LANDCOVER</source>
+      <translation>Import land cover</translation>
+    </message>
+    <message>
+      <source>DEFAULT_LANDCOVER_NAME</source>
+      <translation>Landcover_0</translation>
+    </message>
+  </context>
   <context>
     <name>HYDROGUI_ImportSinusXOp</name>
     <message>