forked from qt-creator/qt-creator
UITour: Fix that steps were skipped when clicking text
If the mouse was released on the text, we must prevent propagation to the IntroductionWidget itself, or it handles the click again. Fixes: QTCREATORBUG-31447 Change-Id: I1e33d767e7ec3d3ead381890294016140a9952fc Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -157,10 +157,12 @@ bool IntroductionWidget::event(QEvent *e)
|
|||||||
|
|
||||||
bool IntroductionWidget::eventFilter(QObject *obj, QEvent *ev)
|
bool IntroductionWidget::eventFilter(QObject *obj, QEvent *ev)
|
||||||
{
|
{
|
||||||
if (obj == parent() && ev->type() == QEvent::Resize)
|
if (obj == parent() && ev->type() == QEvent::Resize) {
|
||||||
resizeToParent();
|
resizeToParent();
|
||||||
else if (obj == m_stepText && ev->type() == QEvent::MouseButtonRelease)
|
} else if (obj == m_stepText && ev->type() == QEvent::MouseButtonRelease) {
|
||||||
step();
|
step();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
return QWidget::eventFilter(obj, ev);
|
return QWidget::eventFilter(obj, ev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user