From cbe44de033a937ad45c51b997c7cb9a0e4a18251 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Schreiner?= Date: Wed, 16 Feb 2011 19:54:19 +0100 Subject: [PATCH] showPreview() was not working as intended; fixed. The preview text displayed in the previewEdit widget was the text of the content opened from the wiki, and not the text entered by the user in the contentEdit widget. --- weboob/applications/qwebcontentedit/main_window.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/weboob/applications/qwebcontentedit/main_window.py b/weboob/applications/qwebcontentedit/main_window.py index 01150b33..3dbd35fa 100644 --- a/weboob/applications/qwebcontentedit/main_window.py +++ b/weboob/applications/qwebcontentedit/main_window.py @@ -78,5 +78,7 @@ self._currentTabChanged) print backtrace def showPreview(self): - self.ui.previewEdit.setHtml(self.backend.get_content_preview(self.content)) + tmp_content = self.content + tmp_content.content=unicode(self.ui.contentEdit.toPlainText()) + self.ui.previewEdit.setHtml(self.backend.get_content_preview(tmp_content)) return