mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 02:50:46 -06:00
Avoid getting notifications of files just saved by us
Closing the file in the destructor seems to be done after the watch is in place, so it can get a notification in some platforms.
This commit is contained in:
@@ -271,6 +271,8 @@ void SqlExecutionArea::saveFile(const QString& filename)
|
||||
// Write to the file
|
||||
if(f.write(getSql().toUtf8()) != -1)
|
||||
{
|
||||
// Close file now. If we let the destructor close it, we can get change notifications.
|
||||
f.close();
|
||||
// Set modified to false so we can get control of unsaved changes when closing.
|
||||
ui->editEditor->setModified(false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user