Skip to content

Commit

Permalink
Merge pull request #1251 from benoit-pierre/revert_4f271959
Browse files Browse the repository at this point in the history
Revert "gui_qt/dictionary_editor: improve updating a translation"
  • Loading branch information
benoit-pierre authored Apr 12, 2021
2 parents b437708 + f8f0be3 commit 8b30891
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
1 change: 0 additions & 1 deletion news.d/bugfix/1219.ui.md

This file was deleted.

9 changes: 4 additions & 5 deletions plover/gui_qt/dictionary_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,10 @@ def setData(self, index, value, role=Qt.EditRole, record=True):
break
if dictionary == old_item.dictionary:
return False
if (old_item.dictionary, old_item.strokes) != (dictionary, strokes):
try:
del old_item.dictionary[old_item.strokes]
except KeyError:
pass
try:
del old_item.dictionary[old_item.strokes]
except KeyError:
pass
if not old_item.strokes and not old_item.translation:
# Merge operations when editing a newly added row.
if self._operations and self._operations[-1] == [(None, old_item)]:
Expand Down

0 comments on commit 8b30891

Please sign in to comment.