vertical/horizontal lines are valid paths with an empty bounding

rectangle
This commit is contained in:
Uwe Rathmann 2024-10-22 08:53:11 +02:00
parent 932d34aea8
commit 6b1ef043a9

View File

@ -146,7 +146,6 @@ void ShapeItem::updateNode( QSGNode* parentNode )
};
const auto rect = contentsRect();
const auto pathRect = m_data->path.controlPointRect();
auto fillNode = static_cast< QskShapeNode* >(
QskSGNode::findChildNode( parentNode, FillRole ) );
@ -154,7 +153,7 @@ void ShapeItem::updateNode( QSGNode* parentNode )
auto borderNode = static_cast< QskStrokeNode* >(
QskSGNode::findChildNode( parentNode, BorderRole ) );
if ( rect.isEmpty() || pathRect.isEmpty() )
if ( rect.isEmpty() || m_data->path.isEmpty() )
{
delete fillNode;
delete borderNode;
@ -162,6 +161,8 @@ void ShapeItem::updateNode( QSGNode* parentNode )
return;
}
const auto pathRect = m_data->path.controlPointRect();
if ( m_data->gradient.isVisible() )
{
if ( fillNode == nullptr )