From 2c20826122a8692fd80f1eb3bc9d5ff09bec2d5a Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 8 Mar 2011 12:11:33 -0700 Subject: [PATCH] Fix set_marked not clearing previously marked ids --- src/calibre/library/caches.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/calibre/library/caches.py b/src/calibre/library/caches.py index 397f9bb403..63920c5dc9 100644 --- a/src/calibre/library/caches.py +++ b/src/calibre/library/caches.py @@ -798,7 +798,10 @@ class ResultCache(SearchQueryParser): # {{{ # Set the values in the cache marked_col = self.FIELD_MAP['marked'] - for id_,val in self.marked_ids_dict.iteritems(): + for id_ in self.iterallids(): + self._data[id_][marked_col] = None + + for id_, val in self.marked_ids_dict.iteritems(): try: self._data[id_][marked_col] = val except: