mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-26 06:44:31 +01: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
1 changed files with 2 additions and 0 deletions
|
|
@ -1287,6 +1287,8 @@ def setData(self, index, value, role=Qt.ItemDataRole.EditRole):
|
|||
_('Author names cannot contain & characters.'))
|
||||
return False
|
||||
if key == 'search':
|
||||
if val == str(item.data(role) or ''):
|
||||
return True
|
||||
if val in self.db.saved_search_names():
|
||||
return self.show_error_after_event_loop_tick(
|
||||
_('Duplicate search name'), _('The saved search name %s is already used.')%val)
|
||||
|
|
|
|||
Loading…
Reference in a new issue