}
+/*!
+ Returns the last visited path. [ static ]
+*/
+QString SUIT_FileDlg::getLastVisitedPath()
+{
+ return myLastVisitedPath;
+}
+
/*!
QFileDialog::dirPath() has a bug on Linux Debian (1 level up from correct
directory is returned). This function fixes the bug.
static QString getExistingDirectory( QWidget* parent, const QString& initial,
const QString& caption, const bool showQuickDir = true );
+ static QString getLastVisitedPath();
+
public slots:
void polish();
filtersList.append(tr("PYTHON_FILES_FILTER"));
filtersList.append(tr("ALL_FILES_FILTER"));
- QString aFile = SUIT_FileDlg::getFileName( desktop(), QDir::currentDirPath(), filtersList, tr( "TOT_DESK_FILE_LOAD_SCRIPT" ), true, true );
+ QString anInitialPath = "";
+ if ( SUIT_FileDlg::getLastVisitedPath().isEmpty() )
+ anInitialPath = QDir::currentDirPath();
+
+ QString aFile = SUIT_FileDlg::getFileName( desktop(), anInitialPath, filtersList, tr( "TOT_DESK_FILE_LOAD_SCRIPT" ), true, true );
if ( !aFile.isEmpty() )
{