From: Paul RASCLE Date: Fri, 24 Jul 2020 14:44:03 +0000 (+0200) Subject: use the name of the firt exported entity as a proposal for SinusX name X-Git-Tag: SH_V2_2_0~88 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=11e11f6bf07b2ac3aa7576d6212a7afcf7e60469;p=modules%2Fhydro.git use the name of the firt exported entity as a proposal for SinusX name --- diff --git a/src/HYDROGUI/HYDROGUI_ExportSinusXOp.cxx b/src/HYDROGUI/HYDROGUI_ExportSinusXOp.cxx index 6d33a7b7..deb96b62 100644 --- a/src/HYDROGUI/HYDROGUI_ExportSinusXOp.cxx +++ b/src/HYDROGUI/HYDROGUI_ExportSinusXOp.cxx @@ -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()); }