From 201649a982be9111edcabc11a067dab2d69d637b Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 4 Dec 2013 23:24:17 +0530 Subject: [PATCH] ... --- src/calibre/gui2/tweak_book/editor/widget.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/gui2/tweak_book/editor/widget.py b/src/calibre/gui2/tweak_book/editor/widget.py index 14ed922bed..3a222523dd 100644 --- a/src/calibre/gui2/tweak_book/editor/widget.py +++ b/src/calibre/gui2/tweak_book/editor/widget.py @@ -210,6 +210,7 @@ class Editor(QMainWindow): return False def launch_editor(path_to_edit, path_is_raw=False, syntax='html'): + app = QApplication([]) if path_is_raw: raw = path_to_edit else: @@ -220,7 +221,6 @@ def launch_editor(path_to_edit, path_is_raw=False, syntax='html'): syntax = 'html' elif ext in ('css',): syntax = 'css' - app = QApplication([]) t = Editor(syntax) t.data = raw t.show()