From d8857bf42d23877321ff51d5987d116a05f5eef6 Mon Sep 17 00:00:00 2001 From: Francois Ferrand Date: Wed, 1 May 2013 12:08:20 +0200 Subject: [PATCH] Fix currentMode() while DB is not yet open. --- src/gui/DatabaseWidget.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/DatabaseWidget.cpp b/src/gui/DatabaseWidget.cpp index f368bf945..e14f93482 100644 --- a/src/gui/DatabaseWidget.cpp +++ b/src/gui/DatabaseWidget.cpp @@ -171,7 +171,8 @@ DatabaseWidget::Mode DatabaseWidget::currentMode() else if (currentWidget() == m_mainWidget) { return DatabaseWidget::ViewMode; } - else if (currentWidget() == m_unlockDatabaseWidget) { + else if (currentWidget() == m_unlockDatabaseWidget || + currentWidget() == m_databaseOpenWidget) { return DatabaseWidget::LockedMode; } else {