summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Wicking <paul.wicking@qt.io>2018-09-07 13:48:44 +0200
committerPaul Wicking <paul.wicking@qt.io>2018-09-10 10:04:08 +0000
commitb13e3b0eb69a86558a62f2544a271434818c012d (patch)
tree088926ca4afa6e4f5d53bdc2823d90ddd34f7148
parent1398f4f828d70971964bf016d8b642d84af1a8e1 (diff)
Example: Close popup on mouse click without assigning new lens position
Clicking in the main renderer window passes a new position to the lens, disregarding the "What's This" (documentation) overlay window. This change checks if the documentation window is open on click, and if it is, closes the documentation window and returns without further handling of the mouse event. Fixes: QTBUG-7205 Change-Id: I821245ec6c78be00d80af461baf8e4d59e0f351f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
-rw-r--r--examples/widgets/painting/deform/pathdeform.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/widgets/painting/deform/pathdeform.cpp b/examples/widgets/painting/deform/pathdeform.cpp
index cfbbdb7e8e..805804716f 100644
--- a/examples/widgets/painting/deform/pathdeform.cpp
+++ b/examples/widgets/painting/deform/pathdeform.cpp
@@ -483,6 +483,10 @@ void PathDeformRenderer::timerEvent(QTimerEvent *e)
void PathDeformRenderer::mousePressEvent(QMouseEvent *e)
{
+ if (m_show_doc) {
+ setDescriptionEnabled(false);
+ return;
+ }
setDescriptionEnabled(false);
m_repaintTimer.stop();