summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/mapwidget.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-03-14 23:28:45 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-04-12 18:19:07 +0300
commitb5d4d88fe596fa91a3f3491fe8acc220a0df7b72 (patch)
treee198af14ac0c2a72609aa66f0c644821c650650e /desktop-widgets/mapwidget.cpp
parent0b851d723e1b57fd2065c268977e023cfb364066 (diff)
downloadsubsurface-b5d4d88fe596fa91a3f3491fe8acc220a0df7b72.tar.gz
Dive site: remove edit mode from dive location widget
Since no dive site field editing enters edit mode anymore, the whole edit mode state and code can be removed from the widget. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/mapwidget.cpp')
-rw-r--r--desktop-widgets/mapwidget.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/desktop-widgets/mapwidget.cpp b/desktop-widgets/mapwidget.cpp
index c7b4a08ad..5ae7451ee 100644
--- a/desktop-widgets/mapwidget.cpp
+++ b/desktop-widgets/mapwidget.cpp
@@ -12,6 +12,7 @@
#include "qt-models/divelocationmodel.h"
#include "mainwindow.h"
#include "divelistview.h"
+#include "command.h"
static const QUrl urlMapWidget = QUrl(QStringLiteral("qrc:/qml/MapWidget.qml"));
static const QUrl urlMapWidgetError = QUrl(QStringLiteral("qrc:/qml/MapWidgetError.qml"));
@@ -49,7 +50,7 @@ void MapWidget::doneLoading(QQuickWidget::Status status)
m_mapHelper = rootObject()->findChild<MapWidgetHelper *>();
connect(m_mapHelper, SIGNAL(selectedDivesChanged(QList<int>)),
this, SLOT(selectedDivesChanged(QList<int>)));
- connect(m_mapHelper, &MapWidgetHelper::coordinatesChanged, this, &MapWidget::coordinatesChangedLocal);
+ connect(m_mapHelper, &MapWidgetHelper::coordinatesChanged, this, &MapWidget::coordinatesChanged);
}
void MapWidget::centerOnSelectedDiveSite()
@@ -112,10 +113,9 @@ void MapWidget::selectedDivesChanged(QList<int> list)
skipReload = false;
}
-void MapWidget::coordinatesChangedLocal(const location_t &location)
+void MapWidget::coordinatesChanged(struct dive_site *ds, const location_t &location)
{
- CHECK_IS_READY_RETURN_VOID();
- emit coordinatesChanged(location);
+ Command::editDiveSiteLocation(ds, location);
}
void MapWidget::diveSiteChanged(struct dive_site *ds, int field)