From 5935f372ab61c4dd7772990fe6e5bfcd214f6ace Mon Sep 17 00:00:00 2001 From: Alexandre Dupas Date: Sun, 22 Sep 2013 17:42:41 +0200 Subject: [PATCH] Fix enabling info widget when closing a dive If the close action is triggered while there is no current dive (empty history), the info widget is enabled. To avoid this behavior, we only enable the info widget during update if the dive index is valid. Signed-off-by: Alexandre Dupas Signed-off-by: Dirk Hohndel --- qt-ui/maintab.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index b9a539fef..18d07ef34 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -217,7 +217,7 @@ void MainTab::clearStats() void MainTab::updateDiveInfo(int dive) { - if(!isEnabled()) + if(!isEnabled() && dive != -1) setEnabled(true); editMode = NONE;