From 08135550e27468e6f2e4a5daa884c574559a6760 Mon Sep 17 00:00:00 2001 From: David Kocik Date: Wed, 1 Feb 2023 09:35:18 +0100 Subject: [PATCH] Fix of hints arrow for gizmos and hints text --- resources/data/hints.ini | 4 ++-- src/slic3r/GUI/GLCanvas3D.cpp | 2 +- src/slic3r/GUI/Gizmos/GLGizmosManager.cpp | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/resources/data/hints.ini b/resources/data/hints.ini index a418c6a89..af0e476e1 100644 --- a/resources/data/hints.ini +++ b/resources/data/hints.ini @@ -237,14 +237,14 @@ documentation_link = https://help.prusa3d.com/article/prusaslicer-printables-com weight = 3 [hint:Cut tool] -text = Cut tool\nDid you know that you can cut a model at any angle and even create aligning pins with the updated Cut tool? Learn more in the documentation. +text = Cut tool\nDid you know that you can cut a model at any angle and even create aligning pins with the updated Cut tool? Learn more in the documentation. documentation_link = https://help.prusa3d.com/article/cut-tool_1779 hypertext_type = gizmo hypertext_gizmo_item = cut weight = 3 [hint:Measurement tool] -text = Measurement tool\nDid you know that you can measure the distances between points, edges and planes, the radius of a hole or the angle between edges or planes? Learn more in the documentation. +text = Measurement tool\nDid you know that you can measure the distances between points, edges and planes, the radius of a hole or the angle between edges or planes? Learn more in the documentation. documentation_link = https://help.prusa3d.com/article/measurement-tool_399451 hypertext_type = gizmo hypertext_gizmo_item = measure diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index a76fbb764..299778be5 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -7055,7 +7055,7 @@ void GLCanvas3D::GizmoHighlighter::init(GLGizmosManager* manager, GLGizmosManage { if (m_timer.IsRunning()) invalidate(); - if (!gizmo || !canvas) + if (gizmo == GLGizmosManager::EType::Undefined || !canvas) return; m_timer.Start(300, false); diff --git a/src/slic3r/GUI/Gizmos/GLGizmosManager.cpp b/src/slic3r/GUI/Gizmos/GLGizmosManager.cpp index 21a1f9ba5..d7d6f309d 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmosManager.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmosManager.cpp @@ -740,6 +740,7 @@ void GLGizmosManager::render_arrow(const GLCanvas3D& parent, EType highlighted_t const float icons_size_x = 2.0f * m_layout.scaled_icons_size() * inv_cnv_w; const float icons_size_y = 2.0f * m_layout.scaled_icons_size() * inv_cnv_h; const float stride_y = 2.0f * m_layout.scaled_stride_y() * inv_cnv_h; + top_y -= stride_y; for (size_t idx : selectable_idxs) { if (idx == highlighted_type) {