Add an entry for the CSV export to the context menu of the Database
Structure tab of the main windows as well which preselects the currently
selected table.
When opening the CSV export dialog via the standard menu also preselect
the currently selected table when the Database Structure tab is active.
When called while the Browse Data tab of the main window is selected
also select the current table or view in the ExportCsvDialog.
Sort the table names in the combobox of the ExportCsvDialog.
Also update the table view widget and the status message in the Execute
Query tab of the main window when the query was valid but returned no
results.
Fixes#38.
When multiple rows are selected in the Browse Data tab of the main
window and the delete record button is clicked delete all selected rows
and not just one of them.
When executing multiple INSERT/UPDATE/... statements don't cancel after
the first one. Also don't try to load them into the SqliteTableModel
class - it won't work and just generates a warning.
Use a custom model for the tree view in the "Database Structure" tab in
the main window, i.e. change from a QTreeWidget to a QTreeView and do
all the item management stuff manually. This might add some code and
complexity but also offers some more flexibility for us.
Add two new settings to allow changing the font size inside the SQL log
and the SQL editor.
Increase the default font size from 8 to 9 - better a bit too big on
some systems than too small on others.
Also do some restructuring in the MainWindow to avoid duplicate code to
reload settings.
When creating a new database file for an SQL import load the default
SQLite extensions - just like it's done when creating a new database the
normal way.
Allow multiple savepoints in DBBrowserDB, i.e. setRestorePoint() doesn't
simply return if the DB is already set to dirty but creates an
additional savepoint.
Track the names of all savepoints which have not been either saved or
reverted yet.
Finally, and that's the whole point of this commit, change the savepoint
logic of the EditTableDialog. We used to have a transaction started when
opening a database which was only committed when the file was closed
again. This way the EditFileDialog could savely create a savepoint when
being opened and just release it when OK was clicked or revert to it
when cancel was clicked. Getting rid of the transaction broke this
logic. The dialog still worked but as the savepoint was released when
the changes were applied all changes made via the dialog were
immediately committed to the database. So clicking the revert button had
no effect on those changes. This is at best an unexpected behaviour but
could also be a problem when some changes are reverted while others
aren't. So, having the option now of keeping multiple savepoints opened
this problem can be fixed by just creating a new savepoint every time
the dialog is opened, reverting to it when it is cancelled and _not_
releasing it when OK is clicked.
I hope this works!
Add a new dialog which is shown when compacting the database. This
dialog allows selecting single objects individually to avoid vacuuming
the entire database.
It also shows a new warning if the database is dirty as changes are
going to be saved before vacuuming.
Support some additional command line options for opening and running SQL
scripts directly.
Don't just take the first argument as a SQLite database to open as it
could be a command line option - Qt and X11 have some default ones.
Don't ask the user wether to create a new DB or use the current one if
no database is opened anyway.
Don't start the import when the save dialog was cancelled.
Remove some useless debug messages, e.g. because they just print an SQL
string which you can see in the SQL log window anyway.
Change some "critical" errors messages to just warning. No sense in
printing a critical error message when the program can handle the
problem by itself.
Also load the default extensions when creating a new database.
When opening a database load the extensions before reading the structure
and the pragmas because the extensions could affect those.