From fe8179d1bfd67d2937b4575c9b4c99c6291a2b4b Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Thu, 5 Jan 2017 13:13:44 +0200 Subject: [PATCH] Do not update labels and grain line if disabled. --HG-- branch : develop --- src/libs/vtools/tools/vtooldetail.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/libs/vtools/tools/vtooldetail.cpp b/src/libs/vtools/tools/vtooldetail.cpp index fc2f971bd..c5b2313e9 100644 --- a/src/libs/vtools/tools/vtooldetail.cpp +++ b/src/libs/vtools/tools/vtooldetail.cpp @@ -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(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(pItem); if (pGLI != grainLine) { - grainLine->Reset(); + if (detail.GetGrainlineGeometry().IsVisible()) + { + grainLine->Reset(); + } } }