mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 18:54:09 -04:00
Fix #1950899 [Renaming Saved seach to the same name displays a warning](https://bugs.launchpad.net/calibre/+bug/1950899)
This commit is contained in:
parent
c45ef9be71
commit
f0cdd690ea
@ -1287,6 +1287,8 @@ class TagsModel(QAbstractItemModel): # {{{
|
|||||||
_('Author names cannot contain & characters.'))
|
_('Author names cannot contain & characters.'))
|
||||||
return False
|
return False
|
||||||
if key == 'search':
|
if key == 'search':
|
||||||
|
if val == str(item.data(role) or ''):
|
||||||
|
return True
|
||||||
if val in self.db.saved_search_names():
|
if val in self.db.saved_search_names():
|
||||||
return self.show_error_after_event_loop_tick(
|
return self.show_error_after_event_loop_tick(
|
||||||
_('Duplicate search name'), _('The saved search name %s is already used.')%val)
|
_('Duplicate search name'), _('The saved search name %s is already used.')%val)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user