From 311e7802e522a2b44517758c948d80258a6006b3 Mon Sep 17 00:00:00 2001 From: Janek Bevendorff Date: Sat, 25 Feb 2017 02:34:47 +0100 Subject: [PATCH] Don't show error message when trying to reload a locked database --- src/gui/DatabaseWidget.cpp | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/gui/DatabaseWidget.cpp b/src/gui/DatabaseWidget.cpp index 1ccf35dd..8a7b2cf3 100644 --- a/src/gui/DatabaseWidget.cpp +++ b/src/gui/DatabaseWidget.cpp @@ -1061,8 +1061,7 @@ void DatabaseWidget::reloadDatabaseFile() // Merge the old database into the new one m_db->setEmitModified(false); db->merge(m_db); - } - else { + } else { // Since we are accepting the new file as-is, internally mark as unmodified // TODO: when saving is moved out of DatabaseTabWidget, this should be replaced m_databaseModified = false; @@ -1086,16 +1085,9 @@ void DatabaseWidget::reloadDatabaseFile() restoreGroupEntryFocus(groupBeforeReload, entryBeforeReload); } - else { - MessageBox::critical(this, tr("Autoreload Failed"), - tr("Could not parse or unlock the new database file while attempting" - " to autoreload this database.")); - } - } - else { + } else { MessageBox::critical(this, tr("Autoreload Failed"), - tr("Could not open the new database file while attempting to autoreload" - " this database.")); + tr("Could not open the new database file while attempting to autoreload this database.")); } // Rewatch the database file