From 856fc357bc3c1db1c2d9fccf13022286d64aaeca Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Tue, 3 Sep 2019 07:11:43 +0200 Subject: [PATCH] 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 --- desktop-widgets/locationinformation.cpp | 3 +-- 1 file changed, 1 insertion(+), 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; }