From efe053ecd2eec122944c67c2a19eb3a525f606af Mon Sep 17 00:00:00 2001 From: Uwe Rathmann Date: Mon, 16 Mar 2020 16:37:28 +0100 Subject: [PATCH] clip rectangle updates fixed --- src/controls/QskFocusIndicator.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/controls/QskFocusIndicator.cpp b/src/controls/QskFocusIndicator.cpp index 2259287a..ad03d642 100644 --- a/src/controls/QskFocusIndicator.cpp +++ b/src/controls/QskFocusIndicator.cpp @@ -11,6 +11,10 @@ #include #include +QSK_QT_PRIVATE_BEGIN +#include +QSK_QT_PRIVATE_END + QSK_SUBCONTROL( QskFocusIndicator, Panel ) static inline QRectF qskFocusIndicatorRect( const QQuickItem* item ) @@ -69,6 +73,7 @@ QskFocusIndicator::~QskFocusIndicator() bool QskFocusIndicator::contains( const QPointF& ) const { + // so that tools like Squish do not see it return false; } @@ -151,6 +156,18 @@ void QskFocusIndicator::updateFocusFrame() const auto clipRect = qskFocusIndicatorClipRect( m_data->clippingItem ); setClip( !clipRect.isEmpty() ); + + if ( clip() ) + { + /* + The clip node is updated on QQuickItemPrivate::Size + So we need to set it here even in situations, where + the size did not change. For now we always trigger an + update of the clipNode, but we could limit it to + changes of the clipRect(). TODO ... + */ + QQuickItemPrivate::get( this )->dirty( QQuickItemPrivate::Size ); + } } update();