From 846918e3aa94e6d3897abe8b8c7aa39181a907bb Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Sat, 2 Feb 2019 20:38:56 +0000 Subject: [PATCH] Remove normal mouse double-click action for decode display windows The normal action selects the word under the mouse pointer and this disrupts callsign highlighting. Normal single-click selection behaviour is unchanged so text can still be selected using the mouse and copied if desired. --- widgets/displaytext.cpp | 1 - widgets/displaytext.h | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/widgets/displaytext.cpp b/widgets/displaytext.cpp index 8058908ba..ca3372f48 100644 --- a/widgets/displaytext.cpp +++ b/widgets/displaytext.cpp @@ -82,7 +82,6 @@ void DisplayText::setContentFont(QFont const& font) void DisplayText::mouseDoubleClickEvent(QMouseEvent *e) { Q_EMIT selectCallsign(e->modifiers ()); - QTextEdit::mouseDoubleClickEvent(e); } void DisplayText::insertLineSpacer(QString const& line) diff --git a/widgets/displaytext.h b/widgets/displaytext.h index feb599303..cd3426af9 100644 --- a/widgets/displaytext.h +++ b/widgets/displaytext.h @@ -44,10 +44,9 @@ public: Q_SLOT void erase (); Q_SLOT void highlight_callsign (QString const& callsign, QColor const& bg, QColor const& fg, bool last_only); -protected: - void mouseDoubleClickEvent(QMouseEvent *e); - private: + void mouseDoubleClickEvent (QMouseEvent *) override; + void extend_vertical_scrollbar (int min, int max); Configuration const * m_config;