mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 11:00:44 -06:00
Only reload DB schema when necessary
We used to reload the database schema whenever it might have been changed and the latest version was required. For example: when the user switches to the Structure tab we need the current schema; so we just reloaded it to be safe - it might have been changed in the Execute SQL tab or wherever. With this commit we don't reload the database schema anymore when an up-to-date version is needed but instead when it was changed by the application. So in the example above it's not reloaded at all anymore. Only if and when the user would execute some structure changing SQL it would be reloaded. Benefits: - Better performance - State of the structure tree view isn't lost as frequently - Structure tree view gets updated when changing the structure in the Execute SQL tab Downsides: - Less error proof (testing!) - No 'automatic' updates when the db is changed by an external application. Any suggestions welcome!
This commit is contained in:
@@ -166,7 +166,6 @@ void EditTableDialog::reject()
|
||||
{
|
||||
// Then rollback to our savepoint
|
||||
pdb->revertToSavepoint(m_sRestorePointName);
|
||||
pdb->updateSchema();
|
||||
|
||||
QDialog::reject();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user