mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-22 09:35:59 +01:00
Edit book: When sorting non text files in the File list recognize numbers in the file names. Fixes #1781721 [[enhancement] editor, make order of images more natural in main screen](https://bugs.launchpad.net/calibre/+bug/1781721)
This commit is contained in:
parent
790c6c67e3
commit
370b142871
1 changed files with 2 additions and 2 deletions
|
|
@ -41,7 +41,7 @@
|
|||
)
|
||||
from calibre.gui2.tweak_book.editor import syntax_from_mime
|
||||
from calibre.gui2.tweak_book.templates import template_for
|
||||
from calibre.utils.icu import sort_key
|
||||
from calibre.utils.icu import numeric_sort_key
|
||||
|
||||
TOP_ICON_SIZE = 24
|
||||
NAME_ROLE = Qt.UserRole
|
||||
|
|
@ -385,7 +385,7 @@ def set_display_name(name, item):
|
|||
|
||||
seen[text] = item
|
||||
item.setText(0, text)
|
||||
item.setText(1, hexlify(sort_key(text)))
|
||||
item.setText(1, hexlify(numeric_sort_key(text)))
|
||||
|
||||
def render_emblems(item, emblems):
|
||||
emblems = tuple(emblems)
|
||||
|
|
|
|||
Loading…
Reference in a new issue