Commit 99fdf594 authored by Marcus Lundblad's avatar Marcus Lundblad

placeEntry: Allow going back to an already selected place

This enables selecting the place again from the search
results when panned away from it.

Fixes #67
parent 1849c14e
Pipeline #101274 passed with stage
in 8 minutes and 43 seconds
......@@ -57,9 +57,6 @@ var PlaceEntry = GObject.registerClass({
if (!this._place && !p)
return;
if (this._place && p && this._locEquals(this._place, p))
return;
if (p) {
if (p.name) {
this._placeText = p.name;
......@@ -150,14 +147,6 @@ var PlaceEntry = GObject.registerClass({
}
}
_locEquals(placeA, placeB) {
if (!placeA.location || !placeB.location)
return false;
return (placeA.location.latitude === placeB.location.latitude &&
placeA.location.longitude === placeB.location.longitude);
}
_createPopover(numVisible, maxChars) {
let popover = new PlacePopover.PlacePopover({ num_visible: numVisible,
relative_to: this,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment