From 02a63cdd76b29ca912662c000b1079ae97f39f42 Mon Sep 17 00:00:00 2001 From: Uwe Rathmann Date: Fri, 29 Dec 2023 08:50:46 +0100 Subject: [PATCH] using subControlRect --- playground/parrots/Overlay.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/playground/parrots/Overlay.cpp b/playground/parrots/Overlay.cpp index b6d0f9a7..63a98178 100644 --- a/playground/parrots/Overlay.cpp +++ b/playground/parrots/Overlay.cpp @@ -132,17 +132,15 @@ namespace { const auto window = overlay->window(); - if ( overlay->size().isEmpty() ) + const auto rect = overlay->subControlRect( Overlay::Panel ); + if ( rect.isEmpty() ) return nullptr; auto rootNode = qskScenegraphAnchorNode( window ); if ( rootNode == nullptr ) return nullptr; - const auto rect = overlay->subControlRect( Overlay::Panel ); - auto textureNode = static_cast< FilterNode* >( node ); - if ( textureNode == nullptr ) { auto texture = new QskSceneTexture( window );