From 4c8a0231f2f2129f63108466120a348810130e4d Mon Sep 17 00:00:00 2001 From: Charles Haley <> Date: Sun, 5 Aug 2012 08:21:20 +0200 Subject: [PATCH] Do not attempt to display hierarchy in the tag browser if categories are not sorted by name. --- src/calibre/gui2/tag_browser/model.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/calibre/gui2/tag_browser/model.py b/src/calibre/gui2/tag_browser/model.py index 012f441bea..dff2d0143d 100644 --- a/src/calibre/gui2/tag_browser/model.py +++ b/src/calibre/gui2/tag_browser/model.py @@ -425,7 +425,8 @@ class TagsModel(QAbstractItemModel): # {{{ last_idx = -collapse category_is_hierarchical = not ( key in ['authors', 'publisher', 'news', 'formats', 'rating'] or - key not in self.db.prefs.get('categories_using_hierarchy', [])) + key not in self.db.prefs.get('categories_using_hierarchy', []) or + config['sort_tags_by'] != 'name') for idx,tag in enumerate(data[key]): components = None