summaryrefslogtreecommitdiff
path: root/src/sidebar.js
diff options
context:
space:
mode:
authorJonas Danielsson <jonas.danielsson@threetimestwo.org>2014-09-10 01:56:55 -0400
committerJonas Danielsson <jonas@threetimestwo.org>2014-09-12 20:17:06 +0200
commit5ac8c23104776217c76d2880037196cd742f85b0 (patch)
tree00a20dd4ad63f803e162a67e348a4e2726021692 /src/sidebar.js
parentddcf913b667040a349b97ccec5e2538983e60357 (diff)
downloadgnome-maps-5ac8c23104776217c76d2880037196cd742f85b0.tar.gz
Hide route on invalid query
When we do not have enough information to show a route, we should not show anything. https://bugzilla.gnome.org/show_bug.cgi?id=736347
Diffstat (limited to 'src/sidebar.js')
-rw-r--r--src/sidebar.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/sidebar.js b/src/sidebar.js
index 7e6d356d..fad8194f 100644
--- a/src/sidebar.js
+++ b/src/sidebar.js
@@ -169,14 +169,13 @@ const Sidebar = new Lang.Class({
query.removePoint(row.get_index() + 1);
row.destroy();
}).bind(this));
-
- this._timeInfo.label = '';
- this._distanceInfo.label = '';
}).bind(this));
query.connect('notify', (function() {
if (query.isValid())
this._instructionStack.visible_child = this._instructionSpinner;
+ else
+ this._clearInstructions();
}).bind(this));
route.connect('update', (function() {
@@ -203,6 +202,9 @@ const Sidebar = new Lang.Class({
_clearInstructions: function() {
let listBox = this._instructionList;
listBox.forall(listBox.remove.bind(listBox));
+
+ this._timeInfo.label = '';
+ this._distanceInfo.label = '';
}
});