Return empty Rect if nothing to paint

This commit is contained in:
Clemens Manert 2023-02-12 01:30:15 +01:00
parent ffa150a5fd
commit d510570943
No known key found for this signature in database
GPG Key ID: 9197EAE8F85E3A18

View File

@ -109,6 +109,9 @@ int QskRadioBoxSkinlet::sampleCount( const QskSkinnable* skinnable,
QRectF QskRadioBoxSkinlet::buttonRect( const QskRadioBox* radio,
const QskAspect::Subcontrol target,
const QRectF& rect, int index ) const {
if( index < 0 ) {
return QRectF();
}
auto result = rect;
result.setSize( radio->strutSizeHint( target ) );