From d2eb1426b09491fd64f2bd9351da647b41b3a306 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 9 Oct 2016 10:27:11 +0530 Subject: [PATCH] Revert "Possible fix for #1630735" This reverts commit 4eeed37a2e02e1d885d88c4bee9f1236916d59e2. Revert as it did not work. --- src/calibre/gui2/tweak_book/editor/text.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/calibre/gui2/tweak_book/editor/text.py b/src/calibre/gui2/tweak_book/editor/text.py index 0dbc268bef..ba28bbf013 100644 --- a/src/calibre/gui2/tweak_book/editor/text.py +++ b/src/calibre/gui2/tweak_book/editor/text.py @@ -7,7 +7,6 @@ __license__ = 'GPL v3' __copyright__ = '2013, Kovid Goyal ' import re, importlib -from collections import deque import textwrap, unicodedata from future_builtins import map @@ -104,7 +103,6 @@ class TextEdit(PlainTextEdit): self.cursorPositionChanged.connect(self.highlight_cursor_line) self.blockCountChanged[int].connect(self.update_line_number_area_width) self.updateRequest.connect(self.update_line_number_area) - self.currently_showing_tooltip_memory = deque(maxlen=10) @dynamic_property def is_modified(self): @@ -650,11 +648,9 @@ class TextEdit(PlainTextEdit): if fmt is not None: tt = unicode(fmt.toolTip()) if tt: - tt = textwrap.fill(tt) - self.currently_showing_tooltip_memory.append(tt) QToolTip.setFont(self.tooltip_font) QToolTip.setPalette(self.tooltip_palette) - QToolTip.showText(ev.globalPos(), tt) + QToolTip.showText(ev.globalPos(), textwrap.fill(tt)) return QToolTip.hideText() ev.ignore()