Remove user categories from the dialog Preferences / Look & feel / Tag browser / Hierarchical categories. They are always hierarchical. Having them listed in this dialog serves no purpose.

This commit is contained in:
Charles Haley 2024-10-26 18:22:28 +01:00
parent 38b2f2da5c
commit 9b3360e5f1
2 changed files with 4 additions and 2 deletions

View File

@ -486,7 +486,8 @@ class TBHierarchicalFields(DisplayedFields): # {{{
def initialize(self, use_defaults=False, pref_data_override=None):
tv = self.gui.tags_view
cats = [k for k in tv.model().categories.keys() if k not in self.cant_make_hierarical]
cats = [k for k in tv.model().categories.keys() if (not k.startswith('@') and
k not in self.cant_make_hierarical)]
ans = []
if use_defaults:
ans = [[k, False] for k in cats]

View File

@ -1685,7 +1685,8 @@ and 'Mystery.Thriller' will be displayed with English and Thriller
both under 'Mystery'. If 'tags' is not checked
then the tags will be displayed each on their own line.</p>
<p>The categories 'authors', 'publisher', 'news', 'formats', and 'rating'
cannot be hierarchical.&lt;/p&gt;</string>
cannot be hierarchical.&lt;/p&gt;
&lt;p&gt;User categories are always hierarchical so don't appear here.&lt;/p&gt;</string>
</property>
<property name="text">
<string>Select categories with &amp;hierarchical items:</string>