From e1a71dcd343c3228a6779a0a39c4a065a846253d Mon Sep 17 00:00:00 2001 From: Josip Date: Thu, 14 May 2015 17:30:41 +0200 Subject: [PATCH] 8497: Error on use of Ctrl-Z --- gramps/gui/widgets/undoableentry.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gramps/gui/widgets/undoableentry.py b/gramps/gui/widgets/undoableentry.py index db4185b1d..f17ba8a0d 100644 --- a/gramps/gui/widgets/undoableentry.py +++ b/gramps/gui/widgets/undoableentry.py @@ -284,7 +284,11 @@ class UndoableEntry(Gtk.Entry): self.set_position(undo_action.offset) def _undo_delete(self, undo_action): - self.insert_text(undo_action.text, undo_action.start) + if not isinstance(undo_action.text, UNITYPE): + undo_action.text = conv_to_unicode(undo_action.text, 'utf-8') + with warnings.catch_warnings(): + warnings.simplefilter('ignore') + self.insert_text(undo_action.text, undo_action.start) if undo_action.delete_key_used: self.set_position(undo_action.start) else: