Fix minore bugs in Seam allowance tool.
--HG-- branch : develop
This commit is contained in:
parent
7d78a0f63f
commit
29c61b9778
|
@ -342,6 +342,7 @@ void VToolSeamAllowance::AllowSelecting(bool enabled)
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void VToolSeamAllowance::ResetChildren(QGraphicsItem *pItem)
|
void VToolSeamAllowance::ResetChildren(QGraphicsItem *pItem)
|
||||||
{
|
{
|
||||||
|
const bool selected = isSelected();
|
||||||
const VPiece detail = VAbstractTool::data.GetPiece(id);
|
const VPiece detail = VAbstractTool::data.GetPiece(id);
|
||||||
VTextGraphicsItem* pVGI = qgraphicsitem_cast<VTextGraphicsItem*>(pItem);
|
VTextGraphicsItem* pVGI = qgraphicsitem_cast<VTextGraphicsItem*>(pItem);
|
||||||
if (pVGI != m_dataLabel)
|
if (pVGI != m_dataLabel)
|
||||||
|
@ -367,6 +368,7 @@ void VToolSeamAllowance::ResetChildren(QGraphicsItem *pItem)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setSelected(selected);
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -703,10 +705,7 @@ void VToolSeamAllowance::paint(QPainter *painter, const QStyleOptionGraphicsItem
|
||||||
|
|
||||||
if (m_dataLabel->IsIdle() == false || m_patternInfo->IsIdle() == false || m_grainLine->IsIdle() == false)
|
if (m_dataLabel->IsIdle() == false || m_patternInfo->IsIdle() == false || m_grainLine->IsIdle() == false)
|
||||||
{
|
{
|
||||||
painter->save();
|
setSelected(true);
|
||||||
painter->setPen(QPen(Qt::black, 3, Qt::DashLine));
|
|
||||||
painter->drawRect(boundingRect().adjusted(1, 1, -1, -1));
|
|
||||||
painter->restore();
|
|
||||||
}
|
}
|
||||||
QGraphicsPathItem::paint(painter, option, widget);
|
QGraphicsPathItem::paint(painter, option, widget);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user