Do not prompt for saving project file on close when it is just open

The project loading code modifies the isProjectModified flag due to the
changes performed. The flag has to set after all the loading is done, so
a close of the just opened project does not prompt for saving.
This commit is contained in:
mgrojo
2019-11-03 18:37:12 +01:00
parent b30ddf98d0
commit 74befa368b

View File

@@ -2364,7 +2364,6 @@ bool MainWindow::loadProject(QString filename, bool readOnly)
if(xml.name() != "sqlb_project")
return false;
isProjectModified = false;
addToRecentFilesMenu(filename, readOnly);
currentProjectFilename = filename;
@@ -2565,6 +2564,8 @@ bool MainWindow::loadProject(QString filename, bool readOnly)
populateTable(); // Refresh view
}
isProjectModified = false;
return !xml.hasError();
} else {
// No project was opened