From: mkr Date: Mon, 30 Jun 2008 10:06:21 +0000 (+0000) Subject: Fix for bug 0019903: EDF 781 SMESH: give a default name when exporting mesh. X-Git-Tag: V4_1_4a1~53 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4f55f53101d4bb4d2fc67ba7200e9e40d4caefc9;p=modules%2Fsmesh.git Fix for bug 0019903: EDF 781 SMESH: give a default name when exporting mesh. --- diff --git a/src/SMESHGUI/SMESHGUI.cxx b/src/SMESHGUI/SMESHGUI.cxx index 6eb028cac..f9ed31577 100644 --- a/src/SMESHGUI/SMESHGUI.cxx +++ b/src/SMESHGUI/SMESHGUI.cxx @@ -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::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();