From df14c8ee0de243decbe993bdb96d70a284dd7428 Mon Sep 17 00:00:00 2001 From: Baldur Karlsson Date: Sat, 10 Jun 2017 08:37:19 +1000 Subject: Backport: Bug [#1947]. Reenable mouse tracking when the window is reshown. Backport of changeset 6300:d0038cc1af23. --- doc/ScintillaHistory.html | 5 +++++ qt/ScintillaEditBase/ScintillaEditBase.cpp | 3 +++ 2 files changed, 8 insertions(+) diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index f19fa74dd..37563d7d5 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -510,6 +510,7 @@ John Flatness Thorsten Kani Bernhard M. Wiedemann + Baldur Karlsson

@@ -531,6 +532,10 @@

  • Support dropped for GTK+ versions before 2.24.
  • +
  • + On Qt, mouse tracking is reenabled when the window is reshown. + Bug #1948. +
  • Release 3.7.5 diff --git a/qt/ScintillaEditBase/ScintillaEditBase.cpp b/qt/ScintillaEditBase/ScintillaEditBase.cpp index 4b7d29440..616fd2323 100644 --- a/qt/ScintillaEditBase/ScintillaEditBase.cpp +++ b/qt/ScintillaEditBase/ScintillaEditBase.cpp @@ -132,6 +132,9 @@ bool ScintillaEditBase::event(QEvent *event) // Circumvent the tab focus convention. keyPressEvent(static_cast(event)); result = event->isAccepted(); + } else if (event->type() == QEvent::Show) { + setMouseTracking(true); + result = QAbstractScrollArea::event(event); } else if (event->type() == QEvent::Hide) { setMouseTracking(false); result = QAbstractScrollArea::event(event); -- cgit v1.2.3