summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Alexandre Dupas <alexandre.dupas@gmail.com>2013-09-22 17:42:41 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-09-22 06:54:34 -0700
commit5935f372ab61c4dd7772990fe6e5bfcd214f6ace (patch)
tree8a3cccb79419e19848c75f29dacb63abd9716759 /qt-ui
parentb1a3c1047a27558b479dd5f13322c4a1c21c5d64 (diff)
downloadsubsurface-5935f372ab61c4dd7772990fe6e5bfcd214f6ace.tar.gz
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 <alexandre.dupas@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/maintab.cpp2
1 files changed, 1 insertions, 1 deletions
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;