diff options
author | Lubomir I. Ivanov <neolit123@gmail.com> | 2017-07-15 23:43:19 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-07-28 07:31:11 -0700 |
commit | b89ecd5ab86a5d4c941b355b2fb04b851adf6820 (patch) | |
tree | db6d97554c36cd4106e2a4a9902eb3aa1407477a /desktop-widgets | |
parent | 8f52b129afdd258cf0689cd629a441ceb5eff198 (diff) | |
download | subsurface-b89ecd5ab86a5d4c941b355b2fb04b851adf6820.tar.gz |
subsurfacewebservices: abstract between GlobeGPS and MapWidget
Call same methods from the two classes based on NO_MARBLE.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Diffstat (limited to 'desktop-widgets')
-rw-r--r-- | desktop-widgets/subsurfacewebservices.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/desktop-widgets/subsurfacewebservices.cpp b/desktop-widgets/subsurfacewebservices.cpp index f53b7eaad..6e8f4cecf 100644 --- a/desktop-widgets/subsurfacewebservices.cpp +++ b/desktop-widgets/subsurfacewebservices.cpp @@ -6,6 +6,7 @@ #include "desktop-widgets/usersurvey.h" #include "core/divelist.h" #include "desktop-widgets/globe.h" +#include "desktop-widgets/mapwidget.h" #include "desktop-widgets/tab-widgets/maintab.h" #include "core/display.h" #include "core/membuffer.h" @@ -478,14 +479,17 @@ void SubsurfaceWebServices::buttonClicked(QAbstractButton *button) i--; // otherwise we skip one site } } -#ifndef NO_MARBLE // finally now that all the extra GPS fixes that weren't used have been deleted - // we can update the globe + // we can update the map if (changed) { +#ifndef NO_MARBLE GlobeGPS::instance()->repopulateLabels(); GlobeGPS::instance()->centerOnDiveSite(get_dive_site_by_uuid(current_dive->dive_site_uuid)); - } +#else + MapWidget::instance()->repopulateLabels(); + MapWidget::instance()->centerOnDiveSite(get_dive_site_by_uuid(current_dive->dive_site_uuid)); #endif + } } break; case QDialogButtonBox::RejectRole: |