Skip to content

Commit

Permalink
limit length of grainline
Browse files Browse the repository at this point in the history
limit length of grainline to twice the length of a arrowhead.
  • Loading branch information
DSCaskey committed Nov 23, 2024
1 parent f168951 commit 1afd21f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/libs/vwidgets/vgrainlineitem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,12 @@ void VGrainlineItem::mouseMoveEvent(QGraphicsSceneMouseEvent* event)
{
dLen *= 2;
}
// limit length of grainline to twice the length of the arrowheads.
qreal minLength = qApp->Settings()->getDefaultArrowLength() * 2.0;
if (m_startLength + dLen < minLength)
{
return;
}
m_length = m_startLength + dLen;

QPointF pos;
Expand Down

0 comments on commit 1afd21f

Please sign in to comment.