summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHashem Nasarat <hashem@riseup.net>2016-01-20 00:46:18 -0500
committerHashem Nasarat <hashem@riseup.net>2016-01-21 20:22:52 -0500
commit14521b773b9d0aae2854c0193926d01beb003d71 (patch)
tree0e7bb18e29549d0ff99c6e6cdba3cecce46d33ad
parentacdff80be817e00a9873b4ea4c7a46c921a8fe77 (diff)
downloadgnome-maps-14521b773b9d0aae2854c0193926d01beb003d71.tar.gz
Layers: Don't hide popover if user cancels FileChooser
If the user accidentally clicks on "Open Layer" and then cancels the FileChooserDialog, we should bring them back to the expected state of having the popover visible. https://bugzilla.gnome.org/show_bug.cgi?id=760875
-rw-r--r--src/layersPopover.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/layersPopover.js b/src/layersPopover.js
index 8543cf00..328e144e 100644
--- a/src/layersPopover.js
+++ b/src/layersPopover.js
@@ -108,11 +108,12 @@ const LayersPopover = new Lang.Class({
transient_for: this.get_parent(),
});
- if (fileChooser.run() === Gtk.ResponseType.OK)
+ if (fileChooser.run() === Gtk.ResponseType.OK) {
this._mapView.openShapeLayers(fileChooser.get_files());
+ this.hide();
+ }
fileChooser.destroy();
- this.hide();
},
_listBoxCreateWidget: function(shapeLayer) {