Bug 1901435]: Capitalized tags in the Category editor is not saved. Fixed by not offering the case change operations unless the item is being edited. This prevents unwelcome interactions between the widget's editor management (undo etc) and changing the case.

This commit is contained in:
Charles Haley 2020-10-31 12:52:44 +00:00
parent 795f326ead
commit a380227d24

View File

@ -296,6 +296,7 @@ class TagListEditor(QDialog, Ui_TagListEditor):
ca.triggered.connect(partial(self.search_for_books, item)) ca.triggered.connect(partial(self.search_for_books, item))
if disable_copy_paste_search: if disable_copy_paste_search:
ca.setEnabled(False) ca.setEnabled(False)
if self.table.state() == self.table.EditingState:
m.addSeparator() m.addSeparator()
case_menu = QMenu(_('Change case')) case_menu = QMenu(_('Change case'))
action_upper_case = case_menu.addAction(_('Upper case')) action_upper_case = case_menu.addAction(_('Upper case'))