summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/locationinformation.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-09-03 07:11:43 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-09-06 11:48:47 -0700
commit856fc357bc3c1db1c2d9fccf13022286d64aaeca (patch)
tree1dfd36a708de35c70db2d153c57d1c8aaa9404cd /desktop-widgets/locationinformation.cpp
parent7d2fe2b7c6d921bd7628cf1047266e7be9a0f2e4 (diff)
downloadsubsurface-856fc357bc3c1db1c2d9fccf13022286d64aaeca.tar.gz
Map: remove unnecessary MapLocationModel::repopulateLabels() calls
The LocationInformationWidget repopulated the map labels if the name or location of a site changed. This is unnecessary because the MapLocationModel catches these signals itself. Remove these calls. As an added bonus, calling repopulateLabels() in QML context leads to crashes later on. Therefore this should fix at least one crash condition when dragging a flag on the map while the dive-site-edit-tab is shown. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/locationinformation.cpp')
-rw-r--r--desktop-widgets/locationinformation.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/desktop-widgets/locationinformation.cpp b/desktop-widgets/locationinformation.cpp
index 4dce409db..19e708ff7 100644
--- a/desktop-widgets/locationinformation.cpp
+++ b/desktop-widgets/locationinformation.cpp
@@ -133,7 +133,6 @@ void LocationInformationWidget::diveSiteChanged(struct dive_site *ds, int field)
switch (field) {
case LocationInformationModel::NAME:
ui.diveSiteName->setText(diveSite->name);
- MapWidget::instance()->repopulateLabels();
return;
case LocationInformationModel::DESCRIPTION:
ui.diveSiteDescription->setText(diveSite->description);
@@ -154,7 +153,7 @@ void LocationInformationWidget::diveSiteChanged(struct dive_site *ds, int field)
enableLocationButtons(false);
ui.diveSiteCoordinates->clear();
}
- MapWidget::instance()->repopulateLabels();
+ return;
default:
return;
}