summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--desktop-widgets/locationinformation.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/desktop-widgets/locationinformation.cpp b/desktop-widgets/locationinformation.cpp
index 74f659593..80676b36f 100644
--- a/desktop-widgets/locationinformation.cpp
+++ b/desktop-widgets/locationinformation.cpp
@@ -5,6 +5,7 @@
#include "desktop-widgets/divelistview.h"
#include "core/qthelper.h"
#include "desktop-widgets/globe.h"
+#include "desktop-widgets/mapwidget.h"
#include "qt-models/filtermodels.h"
#include "qt-models/divelocationmodel.h"
#include "core/divesitehelpers.h"
@@ -43,8 +44,8 @@ LocationInformationWidget::LocationInformationWidget(QWidget *parent) : QGroupBo
ui.diveSiteListView->setModel(filter_model);
ui.diveSiteListView->setModelColumn(LocationInformationModel::NAME);
ui.diveSiteListView->installEventFilter(this);
+ // Map Management Code.
#ifndef NO_MARBLE
- // Globe Management Code.
connect(this, &LocationInformationWidget::requestCoordinates,
GlobeGPS::instance(), &GlobeGPS::prepareForGetDiveCoordinates);
connect(this, &LocationInformationWidget::endRequestCoordinates,
@@ -53,6 +54,15 @@ LocationInformationWidget::LocationInformationWidget(QWidget *parent) : QGroupBo
this, &LocationInformationWidget::updateGpsCoordinates);
connect(this, &LocationInformationWidget::endEditDiveSite,
GlobeGPS::instance(), &GlobeGPS::repopulateLabels);
+#else
+ connect(this, &LocationInformationWidget::requestCoordinates,
+ MapWidget::instance(), &MapWidget::prepareForGetDiveCoordinates);
+ connect(this, &LocationInformationWidget::endRequestCoordinates,
+ MapWidget::instance(), &MapWidget::endGetDiveCoordinates);
+ connect(MapWidget::instance(), &MapWidget::coordinatesChanged,
+ this, &LocationInformationWidget::updateGpsCoordinates);
+ connect(this, &LocationInformationWidget::endEditDiveSite,
+ MapWidget::instance(), &MapWidget::repopulateLabels);
#endif
}