Sync with some additional dialogs
This commit is contained in:
parent
f507b3e8a3
commit
b7ec693533
2 changed files with 5 additions and 3 deletions
|
@ -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);
|
||||
|
|
|
@ -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 + "/", "");
|
||||
|
|
Loading…
Reference in a new issue