From 8d59b0ab6488a892976162684ddc2406d1d338e6 Mon Sep 17 00:00:00 2001 From: mae Date: Fri, 24 Apr 2009 18:16:30 +0200 Subject: [PATCH] eat tooltip events when control is pressed, otherwise the tools destroy the navigation experience --- src/plugins/texteditor/basetexteditor.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/texteditor/basetexteditor.cpp b/src/plugins/texteditor/basetexteditor.cpp index 474fa0c4435..77d35fcdb52 100644 --- a/src/plugins/texteditor/basetexteditor.cpp +++ b/src/plugins/texteditor/basetexteditor.cpp @@ -1480,6 +1480,8 @@ bool BaseTextEditor::viewportEvent(QEvent *event) setTextCursor(cursorForPosition(ce->pos())); } else if (event->type() == QEvent::ToolTip) { const QHelpEvent *he = static_cast(event); + if (QApplication::keyboardModifiers() & Qt::ControlModifier) + return true; // eat tooltip event when control is pressed const QPoint &pos = he->pos(); // Allow plugins to show tooltips