Fix flickering of rotate gizmo

This commit is contained in:
Filip Sykala - NTB T15p 2023-01-31 09:08:53 +01:00
parent bd20bd4dc9
commit 5dd00f792b

View File

@ -649,10 +649,11 @@ void GLGizmoEmboss::on_render() {
if (!selection.is_single_volume_or_modifier() && if (!selection.is_single_volume_or_modifier() &&
!selection.is_single_volume_instance()) return; !selection.is_single_volume_instance()) return;
bool is_surface_dragging = m_temp_transformation.has_value(); bool is_surface_dragging = m_temp_transformation.has_value();
bool is_parent_dragging = m_parent.is_mouse_dragging();
// Do NOT render rotation grabbers when dragging object // Do NOT render rotation grabbers when dragging object
bool is_rotate_by_grabbers = m_dragging; bool is_rotate_by_grabbers = m_dragging;
if (!is_surface_dragging && if (is_rotate_by_grabbers ||
(!m_parent.is_dragging() || is_rotate_by_grabbers)) { (!is_surface_dragging && !is_parent_dragging)) {
glsafe(::glClear(GL_DEPTH_BUFFER_BIT)); glsafe(::glClear(GL_DEPTH_BUFFER_BIT));
m_rotate_gizmo.render(); m_rotate_gizmo.render();
} }