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>
This commit is contained in:
Alexandre Dupas 2013-09-22 17:42:41 +02:00 committed by Dirk Hohndel
parent b1a3c1047a
commit 5935f372ab

View file

@ -217,7 +217,7 @@ void MainTab::clearStats()
void MainTab::updateDiveInfo(int dive)
{
if(!isEnabled())
if(!isEnabled() && dive != -1)
setEnabled(true);
editMode = NONE;