Fix incorrect piece geometry refresh if disable a mirror line.

Fold line still visible.
This commit is contained in:
Roman Telezhynskyi 2024-03-13 16:26:10 +02:00
parent 24d39bffb7
commit 78d878322d
2 changed files with 8 additions and 8 deletions

View File

@ -290,6 +290,12 @@ void VFoldLine::UpdateFoldLineLabel(QGraphicsSimpleTextItem *item) const
return;
}
if (m_foldLine.isNull())
{
item->setVisible(false);
return;
}
if (m_type == FoldLineType::TwoArrows || m_type == FoldLineType::ThreeDots || m_type == FoldLineType::ThreeX ||
m_type == FoldLineType::None)
{

View File

@ -2740,10 +2740,7 @@ void VToolSeamAllowance::UpdateFoldLine(const VFoldLine &foldLine)
if (detail.GetFoldLineType() == FoldLineType::ThreeDots || detail.GetFoldLineType() == FoldLineType::ThreeX ||
detail.GetFoldLineType() == FoldLineType::TwoArrows)
{
if (!shape.isEmpty())
{
m_foldLineMark->setPath(shape.constFirst());
}
m_foldLineMark->setPath(!shape.isEmpty() ? shape.constFirst() : QPainterPath());
m_foldLineLabel->setPath(QPainterPath());
}
else if (detail.GetFoldLineType() == FoldLineType::Text)
@ -2765,10 +2762,7 @@ void VToolSeamAllowance::UpdateFoldLine(const VFoldLine &foldLine)
}
else
{
if (!shape.isEmpty())
{
m_foldLineMark->setPath(shape.constFirst());
}
m_foldLineMark->setPath(!shape.isEmpty() ? shape.constFirst() : QPainterPath());
if (shape.size() > 1 && (settings->GetSingleStrokeOutlineFont() || settings->GetSingleLineFonts()))
{