summaryrefslogtreecommitdiff
path: root/src/placeView.js
diff options
context:
space:
mode:
authorJames Westman <james@flyingpimonster.net>2020-12-31 12:46:28 -0600
committerMarcus Lundblad <ml@update.uu.se>2021-02-09 20:48:40 +0000
commit78d2f95d317df6c540357e8d645993af792ab113 (patch)
tree6f86e69b99ac5f170c5a6fe9b5282cbe3d0117d7 /src/placeView.js
parentd5771cc4fe4e37a83a9613f259ae0b1de705d149 (diff)
downloadgnome-maps-78d2f95d317df6c540357e8d645993af792ab113.tar.gz
placeButtons: Fix edit button
The earlier refactoring of PlaceButtons into a new class didn't update the parent PlaceBar/PlaceView when you finished editing a place on OSM (and would throw an error). Fixed by adding a signal to PlaceButtons for when the place is edited.
Diffstat (limited to 'src/placeView.js')
-rw-r--r--src/placeView.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/placeView.js b/src/placeView.js
index a756c2dd..e5808fc3 100644
--- a/src/placeView.js
+++ b/src/placeView.js
@@ -88,6 +88,7 @@ var PlaceView = GObject.registerClass({
let placeButtons = new PlaceButtons.PlaceButtons({ place: this._place,
mapView: mapView });
+ placeButtons.connect('place-edited', this._onPlaceEdited.bind(this));
ui.placeButtons.add(placeButtons);
if (this.place.isCurrentLocation) {
@@ -549,4 +550,9 @@ var PlaceView = GObject.registerClass({
_updateLocation() {
this._populate(this.place);
}
+
+ /* called when the place is edited via the OSM edit dialog */
+ _onPlaceEdited() {
+ this._populate(this._place);
+ }
});