mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-29 02:40:35 +05:00
Fix for bug 0019870(Import/Export should show current directory).
This commit is contained in:
parent
84773046b3
commit
3e81347908
@ -185,8 +185,8 @@ using namespace std;
|
|||||||
}
|
}
|
||||||
|
|
||||||
QString anInitialPath = "";
|
QString anInitialPath = "";
|
||||||
//if ( SUIT_FileDlg::getLastVisitedPath().isEmpty() )
|
if ( SUIT_FileDlg::getLastVisitedPath().isEmpty() )
|
||||||
// anInitialPath = QDir::currentDirPath();
|
anInitialPath = QDir::currentDirPath();
|
||||||
|
|
||||||
QString filename = SUIT_FileDlg::getFileName(SMESHGUI::desktop(),
|
QString filename = SUIT_FileDlg::getFileName(SMESHGUI::desktop(),
|
||||||
anInitialPath,
|
anInitialPath,
|
||||||
@ -354,10 +354,12 @@ using namespace std;
|
|||||||
if ( resMgr )
|
if ( resMgr )
|
||||||
toCreateGroups = resMgr->booleanValue( "SMESH", "auto_groups", false );
|
toCreateGroups = resMgr->booleanValue( "SMESH", "auto_groups", false );
|
||||||
|
|
||||||
|
QString anInitialPath = "";
|
||||||
|
if ( SUIT_FileDlg::getLastVisitedPath().isEmpty() )
|
||||||
|
anInitialPath = QDir::currentDirPath();
|
||||||
|
|
||||||
if ( theCommandID != 122 && theCommandID != 125 && theCommandID != 140 && theCommandID != 141)
|
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(), "", aFilter, aTitle, false);
|
|
||||||
|
|
||||||
else if(theCommandID == 140 || theCommandID == 141) { // Export to STL
|
else if(theCommandID == 140 || theCommandID == 141) { // Export to STL
|
||||||
QStringList filters;
|
QStringList filters;
|
||||||
QMap<QString, int>::const_iterator it = aFilterMapSTL.begin();
|
QMap<QString, int>::const_iterator it = aFilterMapSTL.begin();
|
||||||
@ -368,6 +370,8 @@ using namespace std;
|
|||||||
fd->setCaption( aTitle );
|
fd->setCaption( aTitle );
|
||||||
fd->setFilters( filters );
|
fd->setFilters( filters );
|
||||||
fd->setSelectedFilter( QObject::tr("STL ASCII (*.stl)") );
|
fd->setSelectedFilter( QObject::tr("STL ASCII (*.stl)") );
|
||||||
|
if ( anInitialPath.isEmpty() )
|
||||||
|
fd->setDir( anInitialPath );
|
||||||
bool is_ok = false;
|
bool is_ok = false;
|
||||||
while (!is_ok) {
|
while (!is_ok) {
|
||||||
fd->exec();
|
fd->exec();
|
||||||
@ -395,6 +399,8 @@ using namespace std;
|
|||||||
//fd->setSelectedFilter( QObject::tr("MED 2.2 (*.med)") );
|
//fd->setSelectedFilter( QObject::tr("MED 2.2 (*.med)") );
|
||||||
fd->setSelectedFilter(aDefaultFilter);
|
fd->setSelectedFilter(aDefaultFilter);
|
||||||
fd->SetChecked(toCreateGroups);
|
fd->SetChecked(toCreateGroups);
|
||||||
|
if ( anInitialPath.isEmpty() )
|
||||||
|
fd->setDir( anInitialPath );
|
||||||
bool is_ok = false;
|
bool is_ok = false;
|
||||||
while (!is_ok) {
|
while (!is_ok) {
|
||||||
fd->exec();
|
fd->exec();
|
||||||
|
Loading…
Reference in New Issue
Block a user