mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -04:00
Fix the issue of renaming user categories to the same name it already has resulting in deletion of the category (see https://bugs.launchpad.net/calibre/+bug/1207131)
This commit is contained in:
parent
8713ebb0b1
commit
ccb3eff05b
@ -971,6 +971,10 @@ class TagsModel(QAbstractItemModel): # {{{
|
||||
else:
|
||||
nkey = ckey[:dotpos+1] + val
|
||||
nkey_lower = icu_lower(nkey)
|
||||
|
||||
if ckey == nkey:
|
||||
return True
|
||||
|
||||
for c in sorted(user_cats.keys(), key=sort_key):
|
||||
if icu_lower(c).startswith(ckey_lower):
|
||||
if len(c) == len(ckey):
|
||||
|
Loading…
x
Reference in New Issue
Block a user