[gnome-maps] Layers: Don't hide popover if user cancels FileChooser



commit 14521b773b9d0aae2854c0193926d01beb003d71
Author: Hashem Nasarat <hashem riseup net>
Date:   Wed Jan 20 00:46:18 2016 -0500

    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

 src/layersPopover.js |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/layersPopover.js b/src/layersPopover.js
index 8543cf0..328e144 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) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]