Merge branch 'master' into keep-import-path

This commit is contained in:
GriffinR 2022-12-03 08:51:37 -05:00 committed by GitHub
commit 4065572ede
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 3 deletions

View file

@ -13,6 +13,9 @@ The **"Breaking Changes"** listed below are changes that have been made in the d
### Changed
- The last-used directory is now preserved in import/export file dialogs.
### Fixed
- Fix New Map settings being preserved when switching projects.
## [5.0.0] - 2022-10-30
### Breaking Changes
- Proper support for pokefirered's clone objects was added, which requires the changes made in [pokefirered/#484](https://github.com/pret/pokefirered/pull/484).

View file

@ -329,7 +329,7 @@ private:
bool isProgrammaticEventTabChange;
bool projectHasUnsavedChanges;
bool projectOpenFailure = false;
bool openedNewMapDialog = false;
bool newMapDefaultsSet = false;
MapSortOrder mapSortOrder;

View file

@ -531,6 +531,7 @@ bool MainWindow::openProject(QString dir) {
this->closeSupplementaryWindows();
this->setProjectSpecificUIVisibility();
this->newMapDefaultsSet = false;
Scripting::init(this);
bool already_open = isProjectOpen() && (editor->project->root == dir);
@ -1193,9 +1194,9 @@ void MainWindow::onNewMapCreated() {
}
void MainWindow::openNewMapPopupWindow() {
if (!openedNewMapDialog) {
if (!this->newMapDefaultsSet) {
NewMapPopup::setDefaultSettings(this->editor->project);
openedNewMapDialog = true;
this->newMapDefaultsSet = true;
}
if (!this->newMapPrompt) {
this->newMapPrompt = new NewMapPopup(this, this->editor->project);