Do not update labels and grain line if disabled.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2017-01-05 13:13:44 +02:00
parent d4317a61ec
commit fe8179d1bf

View File

@ -1283,19 +1283,29 @@ void VToolDetail::AllowSelecting(bool enabled)
//---------------------------------------------------------------------------------------------------------------------
void VToolDetail::ResetChildren(QGraphicsItem *pItem)
{
const VDetail detail = VAbstractTool::data.GetDetail(id);
VTextGraphicsItem* pVGI = dynamic_cast<VTextGraphicsItem*>(pItem);
if (pVGI != dataLabel)
{
dataLabel->Reset();
if (detail.GetPatternPieceData().IsVisible())
{
dataLabel->Reset();
}
}
if (pVGI != patternInfo)
{
patternInfo->Reset();
if (detail.GetPatternInfo().IsVisible())
{
patternInfo->Reset();
}
}
VGrainlineItem* pGLI = dynamic_cast<VGrainlineItem*>(pItem);
if (pGLI != grainLine)
{
grainLine->Reset();
if (detail.GetGrainlineGeometry().IsVisible())
{
grainLine->Reset();
}
}
}