diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-03-14 22:48:03 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-04-12 18:19:07 +0300 |
commit | 0b851d723e1b57fd2065c268977e023cfb364066 (patch) | |
tree | 332265f1cb2fcc9adeab29936ad50ebb9cecaaa5 /desktop-widgets/locationinformation.cpp | |
parent | fa4fedbb488eacff72d5d8691b4da8b34634a71e (diff) | |
download | subsurface-0b851d723e1b57fd2065c268977e023cfb364066.tar.gz |
Undo: update map when dive site location is changed by undo command
Simply hook into the appropriate signal. Thus, the "update dive site
location" button can be removed.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/locationinformation.cpp')
-rw-r--r-- | desktop-widgets/locationinformation.cpp | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/desktop-widgets/locationinformation.cpp b/desktop-widgets/locationinformation.cpp index 17e9d488e..4c9414056 100644 --- a/desktop-widgets/locationinformation.cpp +++ b/desktop-widgets/locationinformation.cpp @@ -36,8 +36,6 @@ LocationInformationWidget::LocationInformationWidget(QWidget *parent) : QGroupBo ui.diveSiteMessage->addAction(rejectAction); connect(ui.geoCodeButton, SIGNAL(clicked()), this, SLOT(reverseGeocode())); - connect(ui.updateLocationButton, SIGNAL(clicked()), this, SLOT(updateLocationOnMap())); - connect(ui.diveSiteCoordinates, SIGNAL(returnPressed()), this, SLOT(updateLocationOnMap())); ui.diveSiteCoordinates->installEventFilter(this); connect(&diveListNotifier, &DiveListNotifier::diveSiteChanged, this, &LocationInformationWidget::diveSiteChanged); @@ -58,8 +56,6 @@ bool LocationInformationWidget::eventFilter(QObject *object, QEvent *ev) contextMenu.addAction(tr("Merge into current site"), this, SLOT(mergeSelectedDiveSites())); contextMenu.exec(ctx->globalPos()); return true; - } else if (ev->type() == QEvent::FocusOut && object == ui.diveSiteCoordinates) { - updateLocationOnMap(); } return false; } @@ -67,7 +63,6 @@ bool LocationInformationWidget::eventFilter(QObject *object, QEvent *ev) void LocationInformationWidget::enableLocationButtons(bool enable) { ui.geoCodeButton->setEnabled(enable); - ui.updateLocationButton->setEnabled(enable); } void LocationInformationWidget::mergeSelectedDiveSites() @@ -241,7 +236,6 @@ void LocationInformationWidget::resetState() MapWidget::instance()->repopulateLabels(); MultiFilterSortModel::instance()->stopFilterDiveSite(); emit endEditDiveSite(); - updateLocationOnMap(); } void LocationInformationWidget::enableEdition() @@ -301,17 +295,6 @@ void LocationInformationWidget::reverseGeocode() ui.locationTags->setText(constructLocationTags(&taxonomy, false)); } -void LocationInformationWidget::updateLocationOnMap() -{ - if (!diveSite) - return; - location_t location; - if (!parseGpsText(ui.diveSiteCoordinates->text(), location)) - return; - MapWidget::instance()->updateDiveSiteCoordinates(diveSite, location); - filter_model.setCoordinates(location); -} - DiveLocationFilterProxyModel::DiveLocationFilterProxyModel(QObject*) { } |