diff --git a/src/slic3r/GUI/Gizmos/GLGizmoMeasure.cpp b/src/slic3r/GUI/Gizmos/GLGizmoMeasure.cpp index 74a5c93f7..bf7fd04a7 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoMeasure.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoMeasure.cpp @@ -276,8 +276,9 @@ void GLGizmoMeasure::on_render() case Measure::SurfaceFeatureType::Circle: { const auto [center, radius, normal] = m_curr_feature->get_circle(); - if (m_last_inv_zoom != inv_zoom) { + if (m_last_inv_zoom != inv_zoom || m_last_circle != m_curr_feature) { m_last_inv_zoom = inv_zoom; + m_last_circle = m_curr_feature; m_circle.reset(); GLModel::Geometry circle_geometry = smooth_torus(64, 16, float(radius), 5.0f * inv_zoom); m_circle.mesh_raycaster = std::make_unique(std::make_shared(std::move(circle_geometry.get_as_indexed_triangle_set()))); diff --git a/src/slic3r/GUI/Gizmos/GLGizmoMeasure.hpp b/src/slic3r/GUI/Gizmos/GLGizmoMeasure.hpp index 9dad61397..7c82f7b9f 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoMeasure.hpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoMeasure.hpp @@ -93,6 +93,7 @@ class GLGizmoMeasure : public GLGizmoBase Vec3d m_first_instance_scale{ Vec3d::Ones() }; Vec3d m_first_instance_mirror{ Vec3d::Ones() }; float m_last_inv_zoom{ 0.0f }; + std::optional m_last_circle; int m_last_plane_idx{ -1 }; bool m_mouse_left_down{ false }; // for detection left_up of this gizmo