Fixed cursor size clamping in MMU segmentation gizmo

This commit is contained in:
Lukas Matena 2021-07-22 11:02:47 +02:00
parent 13c77990aa
commit 5bffed394b

View File

@ -368,8 +368,6 @@ void GLGizmoMmuSegmentation::on_render_input_window(float x, float y, float bott
ImGui::PopTextWrapPos();
ImGui::EndTooltip();
}
// Manually inserted values aren't clamped by ImGui. Zero cursor size results in a crash.
m_cursor_radius = std::clamp(m_cursor_radius, CursorRadiusMin, CursorRadiusMax);
ImGui::Separator();
@ -435,6 +433,8 @@ void GLGizmoMmuSegmentation::on_render_input_window(float x, float y, float bott
ImGui::PopTextWrapPos();
ImGui::EndTooltip();
}
// Manually inserted values aren't clamped by ImGui. Zero cursor size results in a crash.
m_cursor_radius = std::clamp(m_cursor_radius, CursorRadiusMin, CursorRadiusMax);
m_imgui->checkbox(_L("Split triangles"), m_triangle_splitting_enabled);