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>
This commit is contained in:
Paul Wicking 2018-09-07 13:48:44 +02:00
parent 1398f4f828
commit b13e3b0eb6

View File

@ -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();