]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Fix for bug 0019903: EDF 781 SMESH: give a default name when exporting mesh.
authormkr <mkr@opencascade.com>
Mon, 30 Jun 2008 10:06:21 +0000 (10:06 +0000)
committermkr <mkr@opencascade.com>
Mon, 30 Jun 2008 10:06:21 +0000 (10:06 +0000)
src/SMESHGUI/SMESHGUI.cxx

index 6eb028cace811c78628afa7b15e9335129e9b10e..f9ed315776ef4f3bd3f03fb83d6ba53238302777 100644 (file)
@@ -359,7 +359,8 @@ using namespace std;
          anInitialPath = QDir::currentDirPath();
 
        if ( theCommandID != 122 && theCommandID != 125 && theCommandID != 140 && theCommandID != 141)
-         aFilename = SUIT_FileDlg::getFileName(SMESHGUI::desktop(), anInitialPath, aFilter, aTitle, false);
+         aFilename = SUIT_FileDlg::getFileName(SMESHGUI::desktop(), anInitialPath + QString("/") + anIObject->getName(),
+                                               aFilter, aTitle, false);
        else if(theCommandID == 140 || theCommandID == 141) { // Export to STL
          QStringList filters;
           QMap<QString, int>::const_iterator it = aFilterMapSTL.begin();
@@ -372,6 +373,7 @@ using namespace std;
           fd->setSelectedFilter( QObject::tr("STL ASCII  (*.stl)") );
          if ( !anInitialPath.isEmpty() )
            fd->setDir( anInitialPath );
+         fd->setSelection(anIObject->getName());
           bool is_ok = false;
           while (!is_ok) {
             fd->exec();
@@ -401,6 +403,7 @@ using namespace std;
           fd->SetChecked(toCreateGroups);
          if ( !anInitialPath.isEmpty() )
            fd->setDir( anInitialPath );
+         fd->setSelection(anIObject->getName());
           bool is_ok = false;
           while (!is_ok) {
             fd->exec();