From d98317942e5ea24edea255033ccdb22f7de4887d Mon Sep 17 00:00:00 2001 From: Uwe Rathmann Date: Fri, 2 Feb 2018 18:04:38 +0100 Subject: [PATCH] bad autofocusing of scopes, when reciving the focus removed - it lead to inconsistent QQuickItem states, when focused items get reparented. --- examples/layouts/main.cpp | 1 - src/controls/QskControl.cpp | 20 -------------------- 2 files changed, 21 deletions(-) diff --git a/examples/layouts/main.cpp b/examples/layouts/main.cpp index b280b211..9c5c5595 100644 --- a/examples/layouts/main.cpp +++ b/examples/layouts/main.cpp @@ -69,7 +69,6 @@ int main( int argc, char* argv[] ) tabView->addTab( "Stack Layout", new StackLayoutPage() ); tabView->setCurrentIndex( 4 ); - tabView->setFocus( true ); QSize size( 800, 600 ); size = size.expandedTo( tabView->sizeHint().toSize() ); diff --git a/src/controls/QskControl.cpp b/src/controls/QskControl.cpp index b8d123fc..0d09284e 100644 --- a/src/controls/QskControl.cpp +++ b/src/controls/QskControl.cpp @@ -1091,26 +1091,6 @@ bool QskControl::event( QEvent* event ) break; } - case QEvent::FocusIn: - { - if ( isFocusScope() && isTabFence() && ( scopedFocusItem() == nullptr ) ) - { - /* - When receiving the focus we need to have a focused - item, so that the tab focus chain has a starting point. - */ - - if ( auto focusItem = nextItemInFocusChain( true ) ) - { - if ( qskIsItemComplete( focusItem ) - && qskIsAncestorOf( this, focusItem ) ) - { - focusItem->setFocus( true ); - } - } - } - break; - } } switch( eventType )