diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index e3ee72c6..03247c6f 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -2430,12 +2430,12 @@ void MainWindow::importMapFromAdvanceMap1_92() QString filepath = QFileDialog::getOpenFileName( this, QString("Import Map from Advance Map 1.92"), - this->editor->project->root, + this->editor->project->importExportPath, "Advance Map 1.92 Map Files (*.map)"); if (filepath.isEmpty()) { return; } - + this->editor->project->setImportExportPath(filepath); MapParser parser; bool error = false; MapLayout *mapLayout = parser.parse(filepath, &error, editor->project); diff --git a/src/ui/regionmappropertiesdialog.cpp b/src/ui/regionmappropertiesdialog.cpp index 99c3ef93..bb691870 100644 --- a/src/ui/regionmappropertiesdialog.cpp +++ b/src/ui/regionmappropertiesdialog.cpp @@ -34,7 +34,9 @@ QString RegionMapPropertiesDialog::browse(QString filter, QFileDialog::FileMode if (!this->project) return QString(); QFileDialog browser; browser.setFileMode(mode); - QString filepath = browser.getOpenFileName(this, "Select a File", this->project->root, filter); + QString filepath = browser.getOpenFileName(this, "Select a File", this->project->importExportPath, filter); + if (!filepath.isEmpty()) + this->project->setImportExportPath(filepath); // remove the project root from the filepath return filepath.replace(this->project->root + "/", "");