mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 02:50:46 -06:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user