mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 11:00:44 -06:00
Remove unnecessary checks and message boxes
This removes a couple of checks whether the database is opened. They are not really necessary because the respective buttons are disabled anyway in case no database is loaded. This was inconsistent anyway since not all functions were checking for this. It also gets rid of a string which translators have to deal with even though it is never going to be displayed.
This commit is contained in:
@@ -752,11 +752,6 @@ void MainWindow::refresh()
|
||||
|
||||
void MainWindow::createTable()
|
||||
{
|
||||
if (!db.isOpen()){
|
||||
QMessageBox::information( this, QApplication::applicationName(), tr("There is no database opened. Please open or create a new database file."));
|
||||
return;
|
||||
}
|
||||
|
||||
EditTableDialog dialog(db, sqlb::ObjectIdentifier(), true, this);
|
||||
if(dialog.exec())
|
||||
{
|
||||
@@ -766,11 +761,6 @@ void MainWindow::createTable()
|
||||
|
||||
void MainWindow::createIndex()
|
||||
{
|
||||
if (!db.isOpen()){
|
||||
QMessageBox::information( this, QApplication::applicationName(), tr("There is no database opened. Please open or create a new database file."));
|
||||
return;
|
||||
}
|
||||
|
||||
EditIndexDialog dialog(db, sqlb::ObjectIdentifier(), true, this);
|
||||
if(dialog.exec())
|
||||
populateTable();
|
||||
|
||||
Reference in New Issue
Block a user