mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -04:00
Merge branch 'master' of https://github.com/cbhaley/calibre
Fixes #1909293 [Composite tag-like column: list_re_group is case-sensitive?](https://bugs.launchpad.net/calibre/+bug/1909293) Fixes #1909258 [Enhancement Request: Quickview: Dropdown menu for all selectable columns](https://bugs.launchpad.net/calibre/+bug/1909258)
This commit is contained in:
commit
1e7fe201d1
@ -490,7 +490,9 @@ class Quickview(QDialog, Ui_Quickview):
|
||||
self.indicate_no_items()
|
||||
|
||||
def is_category(self, key):
|
||||
return key is not None and self.fm[key]['is_category']
|
||||
return key is not None and (self.fm[key]['is_category'] or
|
||||
(self.fm[key]['datatype'] == 'composite' and
|
||||
self.fm[key]['display'].get('make_category', False)))
|
||||
|
||||
def _refresh(self, book_id, key):
|
||||
'''
|
||||
|
@ -1306,16 +1306,9 @@ class BuiltinListUnion(BuiltinFormatterFunction):
|
||||
aliases = ['merge_lists']
|
||||
|
||||
def evaluate(self, formatter, kwargs, mi, locals, list1, list2, separator):
|
||||
res = [l.strip() for l in list1.split(separator) if l.strip()]
|
||||
l2 = [l.strip() for l in list2.split(separator) if l.strip()]
|
||||
lcl1 = {icu_lower(l) for l in res}
|
||||
|
||||
for i in l2:
|
||||
if icu_lower(i) not in lcl1 and i not in res:
|
||||
res.append(i)
|
||||
if separator == ',':
|
||||
return ', '.join(res)
|
||||
return separator.join(res)
|
||||
res = {icu_lower(l.strip()): l.strip() for l in list2.split(separator) if l.strip()}
|
||||
res.update({icu_lower(l.strip()): l.strip() for l in list1.split(separator) if l.strip()})
|
||||
return separator.join(res.values())
|
||||
|
||||
|
||||
class BuiltinListDifference(BuiltinFormatterFunction):
|
||||
|
Loading…
x
Reference in New Issue
Block a user