mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-11 09:13:57 -04:00
py3: make column rules editor work
The sort key grades each string as a bytestring, so falling back on an integer is incorrect.
This commit is contained in:
parent
d9918b5b9c
commit
4a49ea4352
@ -429,7 +429,7 @@ class RuleEditor(QDialog): # {{{
|
|||||||
b.setMinimumContentsLength(15)
|
b.setMinimumContentsLength(15)
|
||||||
|
|
||||||
for key in sorted(displayable_columns(fm),
|
for key in sorted(displayable_columns(fm),
|
||||||
key=lambda k: sort_key(fm[k]['name']) if k != color_row_key else 0):
|
key=lambda k: sort_key(fm[k]['name']) if k != color_row_key else b''):
|
||||||
if key == color_row_key and self.rule_kind != 'color':
|
if key == color_row_key and self.rule_kind != 'color':
|
||||||
continue
|
continue
|
||||||
name = all_columns_string if key == color_row_key else fm[key]['name']
|
name = all_columns_string if key == color_row_key else fm[key]['name']
|
||||||
|
Loading…
x
Reference in New Issue
Block a user