From 4cb057f8a580b7fcbfb0d5548b52d508727ede4b Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 25 Jun 2017 15:11:20 +0530 Subject: [PATCH] I have no idea why this happens, but... Fix #1700191 [Error occasionally pops up when pressing Edit Medata](https://bugs.launchpad.net/calibre/+bug/1700191) --- src/calibre/gui2/comments_editor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/calibre/gui2/comments_editor.py b/src/calibre/gui2/comments_editor.py index 72350a3a13..a7ce5a930c 100644 --- a/src/calibre/gui2/comments_editor.py +++ b/src/calibre/gui2/comments_editor.py @@ -702,7 +702,8 @@ class Editor(QWidget): # {{{ self.toolbar2.addAction(self.editor.action_block_style) w = self.toolbar2.widgetForAction(self.editor.action_block_style) - w.setPopupMode(w.InstantPopup) + if hasattr(w, 'setPopupMode'): + w.setPopupMode(w.InstantPopup) self.toolbar2.addAction(self.editor.action_insert_link) # }}}