From 4f55f53101d4bb4d2fc67ba7200e9e40d4caefc9 Mon Sep 17 00:00:00 2001 From: mkr Date: Mon, 30 Jun 2008 10:06:21 +0000 Subject: [PATCH] Fix for bug 0019903: EDF 781 SMESH: give a default name when exporting mesh. --- src/SMESHGUI/SMESHGUI.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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(); -- 2.39.2