[devhelp] KeywordModel: change the stamp when content changes



commit 9c6b356b61c83f0c0964732fe2263167a97fa5a1
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sat Jan 20 21:04:50 2018 +0100

    KeywordModel: change the stamp when content changes

 src/dh-keyword-model.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/dh-keyword-model.c b/src/dh-keyword-model.c
index b2257e1..6ff06e4 100644
--- a/src/dh-keyword-model.c
+++ b/src/dh-keyword-model.c
@@ -686,6 +686,11 @@ dh_keyword_model_filter (DhKeywordModel *model,
         dh_util_queue_concat (&priv->links, new_links);
         new_links = NULL;
 
+        /* The content has been modified, change the stamp so that older
+         * GtkTreeIter's become invalid.
+         */
+        priv->stamp++;
+
         _dh_search_context_free (search_context);
 
         /* One hit */


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