]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
use the name of the firt exported entity as a proposal for SinusX name
authorPaul RASCLE <paul.rascle@openfields.fr>
Fri, 24 Jul 2020 14:44:03 +0000 (16:44 +0200)
committerYOANN AUDOUIN <B61570@dsp0851742.postes.calibre.edf.fr>
Fri, 30 Oct 2020 16:06:22 +0000 (17:06 +0100)
src/HYDROGUI/HYDROGUI_ExportSinusXOp.cxx

index 6d33a7b7c4a3e90e0c3a236fc257b50345325137..deb96b6200c68a951c5d84176cc9add929dcc4ac 100644 (file)
@@ -72,7 +72,9 @@ void HYDROGUI_ExportSinusXOp::onExportItems()
   if (!aPanel->GetSelectedEntities().IsEmpty())
   {
     //Export selected items to SX file
-    QString aFileName = SUIT_FileDlg::getFileName( module()->getApp()->desktop(), "", aFilter, tr( "EXPORT_SINUSX" ), false );
+       QString firstName = aPanel->GetSelectedEntities().First()->GetName(); // name of the fist object is used as a proposal for the filename
+       firstName = firstName + ".sx";
+    QString aFileName = SUIT_FileDlg::getFileName( module()->getApp()->desktop(), firstName, aFilter, tr( "EXPORT_SINUSX" ), false );
     HYDROData_SinusX anExporter;
     anExporter.Export(aFileName, aPanel->GetSelectedEntities());
   }