Skip to content

Commit

Permalink
vertical/horizontal lines are valid paths with an empty bounding
Browse files Browse the repository at this point in the history
rectangle
  • Loading branch information
uwerat committed Oct 22, 2024
1 parent 932d34a commit 6b1ef04
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions playground/shapes/ShapeItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,22 +146,23 @@ 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 ) );

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;

return;
}

const auto pathRect = m_data->path.controlPointRect();

if ( m_data->gradient.isVisible() )
{
if ( fillNode == nullptr )
Expand Down

0 comments on commit 6b1ef04

Please sign in to comment.