From f027d92a4cf3d1c106baf3825314a9611963b2e0 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Mon, 7 May 2018 17:59:21 +0300 Subject: [PATCH] Resolved issue #845. Defining a "closed" internal path. --HG-- branch : develop --- src/libs/vtools/visualization/line/vistoolspecialpoint.cpp | 5 ++--- src/libs/vtools/visualization/path/vispiecespecialpoints.cpp | 4 ++-- src/libs/vtools/visualization/path/vistoolpiecepath.cpp | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/libs/vtools/visualization/line/vistoolspecialpoint.cpp b/src/libs/vtools/visualization/line/vistoolspecialpoint.cpp index a1fea2291..623a51da5 100644 --- a/src/libs/vtools/visualization/line/vistoolspecialpoint.cpp +++ b/src/libs/vtools/visualization/line/vistoolspecialpoint.cpp @@ -61,10 +61,9 @@ void VisToolSpecialPoint::RefreshGeometry() { if (object1Id > NULL_ID) { - const QSharedPointer point = Visualization::data->GeometricObject(object1Id); - + // Keep first, you can hide only objects those have shape + m_point->RefreshPointGeometry(*Visualization::data->GeometricObject(object1Id)); m_point->SetOnlyPoint(mode == Mode::Creation); - m_point->RefreshPointGeometry(*point); m_point->setVisible(true); } } diff --git a/src/libs/vtools/visualization/path/vispiecespecialpoints.cpp b/src/libs/vtools/visualization/path/vispiecespecialpoints.cpp index 99353a129..3eaf6b488 100644 --- a/src/libs/vtools/visualization/path/vispiecespecialpoints.cpp +++ b/src/libs/vtools/visualization/path/vispiecespecialpoints.cpp @@ -66,9 +66,9 @@ void VisPieceSpecialPoints::RefreshGeometry() for (int i = 0; i < m_spoints.size(); ++i) { VSimplePoint *point = GetPoint(static_cast(i), supportColor); + // Keep first, you can hide only objects those have shape + point->RefreshPointGeometry(*Visualization::data->GeometricObject(m_spoints.at(i))); point->SetOnlyPoint(false); - const QSharedPointer p = Visualization::data->GeometricObject(m_spoints.at(i)); - point->RefreshPointGeometry(*p); point->setVisible(true); if (m_showRect) diff --git a/src/libs/vtools/visualization/path/vistoolpiecepath.cpp b/src/libs/vtools/visualization/path/vistoolpiecepath.cpp index 9e73cc653..31ce60bc4 100644 --- a/src/libs/vtools/visualization/path/vistoolpiecepath.cpp +++ b/src/libs/vtools/visualization/path/vistoolpiecepath.cpp @@ -57,8 +57,8 @@ void VisToolPiecePath::RefreshGeometry() for (int i = 0; i < nodes.size(); ++i) { VSimplePoint *point = GetPoint(static_cast(i), supportColor); + point->RefreshPointGeometry(nodes.at(i)); // Keep first, you can hide only objects those have shape point->SetOnlyPoint(mode == Mode::Creation); - point->RefreshPointGeometry(nodes.at(i)); point->setVisible(true); }