From 54832c893e70d311b47758984f2b0e4c9bded498 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 12 May 2012 21:37:22 +0530 Subject: [PATCH] Fix #998364 (Comments edit clear issues in single metadata edit) --- src/calibre/gui2/comments_editor.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/calibre/gui2/comments_editor.py b/src/calibre/gui2/comments_editor.py index 69e17ef028..3d7be68f3b 100644 --- a/src/calibre/gui2/comments_editor.py +++ b/src/calibre/gui2/comments_editor.py @@ -161,8 +161,8 @@ class EditorWidget(QWebView): # {{{ self.page().setContentEditable(True) def clear_text(self, *args): - self.action_select_all.trigger() - self.action_cut.trigger() + self.html = u'' + self.page().contentsChanged.emit() def link_clicked(self, url): open_url(url) @@ -627,4 +627,6 @@ if __name__ == '__main__': w = Editor() w.resize(800, 600) w.show() + w.html = 'testing' + app.exec_() #print w.html