Don't enable the widgets before finishing the thread

The maintab should be disabled when the geolocation thread is
running - but if you changed the dive, it would reenabled it.
(actually this should be only on the location widget, I'll send
another path later)

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2015-05-16 21:41:21 -03:00 committed by Dirk Hohndel
parent 2b99ae5781
commit 96850b9931

View file

@ -15,6 +15,7 @@
#include "display.h"
#include "profile/profilewidget2.h"
#include "diveplanner.h"
#include "divesitehelpers.h"
#if defined(FBSUPPORT)
#include "socialnetworks.h"
@ -406,7 +407,7 @@ void MainTab::updateDiveInfo(bool clear)
// don't execute this while adding / planning a dive
if (editMode == ADD || editMode == MANUALLY_ADDED_DIVE || MainWindow::instance()->graphics()->isPlanner())
return;
if (!isEnabled() && !clear)
if (!isEnabled() && !clear && !ReverseGeoLoockupThread::instance()->isRunning())
setEnabled(true);
if (isEnabled() && clear)
setEnabled(false);