[gnome-maps] placeStore: update type table on recent remove



commit d6b7f4ee73abffc39799de5db578ceed2e6261b6
Author: Jonas Danielsson <jonas threetimestwo org>
Date:   Thu Jan 23 12:47:50 2014 +0100

    placeStore: update type table on recent remove

 src/placeStore.js |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/placeStore.js b/src/placeStore.js
index 1377d6b..4214cd3 100644
--- a/src/placeStore.js
+++ b/src/placeStore.js
@@ -90,8 +90,14 @@ const PlaceStore = new Lang.Class({
             // the first one we encounter.
             this._removeIf((function(model, iter) {
                 let type = model.get_value(iter, Columns.TYPE);
-                return type === PlaceType.RECENT;
-            }), true);
+
+                if (type === PlaceType.RECENT) {
+                    let name = model.get_value(iter, Columns.NAME);
+                    this._typeTable[name] = null;
+                    return true;
+                }
+                return false;
+            }).bind(this), true);
         }
         this._addPlace(place, PlaceType.RECENT, new Date().getTime());
         this._numRecent++;


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