Warn when closing with unsaved encounter changes

This commit is contained in:
GriffinR
2020-05-11 10:45:11 -04:00
committed by huderlem
parent fcb320bd79
commit 53ba6f5ab9
5 changed files with 14 additions and 0 deletions

View File

@@ -115,6 +115,7 @@ void MainWindow::initEditor() {
connect(this->editor, SIGNAL(tilesetChanged(QString)), this, SLOT(onTilesetChanged(QString)));
connect(this->editor, SIGNAL(warpEventDoubleClicked(QString,QString)), this, SLOT(openWarpMap(QString,QString)));
connect(this->editor, SIGNAL(currentMetatilesSelectionChanged()), this, SLOT(currentMetatilesSelectionChanged()));
connect(this->editor, SIGNAL(wildMonDataChanged()), this, SLOT(onWildMonDataChanged()));
connect(this->editor, &Editor::wheelZoom, this, &MainWindow::scaleMapView);
this->loadUserSettings();
@@ -2182,6 +2183,10 @@ void MainWindow::onTilesetsSaved(QString primaryTilesetLabel, QString secondaryT
this->editor->updateSecondaryTileset(secondaryTilesetLabel, true);
}
void MainWindow::onWildMonDataChanged() {
projectHasUnsavedChanges = true;
}
void MainWindow::on_action_Export_Map_Image_triggered() {
showExportMapImageWindow(false);
}