From 4c3892dbd37ccde750ee7830bb169848da115497 Mon Sep 17 00:00:00 2001 From: Charles Haley Date: Wed, 9 Jul 2014 22:32:19 +0200 Subject: [PATCH] Fix regression caused by using compiled templates in icon rules. The first template was used for all the composed icon rules. --- src/calibre/gui2/library/models.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/calibre/gui2/library/models.py b/src/calibre/gui2/library/models.py index 97a05fa2e7..cbee7e1b79 100644 --- a/src/calibre/gui2/library/models.py +++ b/src/calibre/gui2/library/models.py @@ -92,9 +92,10 @@ class ColumnIcon(object): # {{{ if self.mi is None: self.mi = db.new_api.get_proxy_metadata(id_) icons = [] - for kind, fmt in fmts: + for dex, (kind, fmt) in enumerate(fmts): rule_icons = self.formatter.safe_format(fmt, self.mi, '', self.mi, - column_name=cache_index, template_cache=template_cache) + column_name=cache_index+str(dex), + template_cache=template_cache) if not rule_icons: continue icon_list = [ic.strip() for ic in rule_icons.split(':')]