mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 17:27:52 -06:00
Tech ENABLE_GLBEGIN_GLEND_REMOVAL - Fixed bug in rendering gizmo rotate
(cherry picked from commit prusa3d/PrusaSlicer@5fcb618f96)
This commit is contained in:
parent
d1b0743735
commit
d85bbcba50
1 changed files with 4 additions and 5 deletions
|
@ -134,15 +134,14 @@ void GLGizmoRotate::on_render()
|
||||||
if (shader != nullptr) {
|
if (shader != nullptr) {
|
||||||
shader->start_using();
|
shader->start_using();
|
||||||
|
|
||||||
const float radius = Offset + m_parent.get_selection().get_bounding_box().radius();
|
const bool radius_changed = std::abs(m_old_radius - m_radius) > EPSILON;
|
||||||
const bool radius_changed = std::abs(m_old_radius - radius) > EPSILON;
|
m_old_radius = m_radius;
|
||||||
m_old_radius = radius;
|
|
||||||
|
|
||||||
ColorRGBA color((m_hover_id != -1) ? m_drag_color : m_highlight_color);
|
ColorRGBA color((m_hover_id != -1) ? m_drag_color : m_highlight_color);
|
||||||
render_circle(color, radius_changed);
|
render_circle(color, radius_changed);
|
||||||
if (m_hover_id != -1) {
|
if (m_hover_id != -1) {
|
||||||
const bool hover_radius_changed = std::abs(m_old_hover_radius - radius) > EPSILON;
|
const bool hover_radius_changed = std::abs(m_old_hover_radius - m_radius) > EPSILON;
|
||||||
m_old_hover_radius = radius;
|
m_old_hover_radius = m_radius;
|
||||||
|
|
||||||
render_scale(color, hover_radius_changed);
|
render_scale(color, hover_radius_changed);
|
||||||
render_snap_radii(color, hover_radius_changed);
|
render_snap_radii(color, hover_radius_changed);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue