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>
This commit is contained in:
Berthold Stoeger 2019-09-03 07:11:43 +02:00 committed by Dirk Hohndel
parent 7d2fe2b7c6
commit 856fc357bc

View file

@ -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;
}