Skip to content

Commit

Permalink
FIX: Simplify mesh decimate ratio text input not work
Browse files Browse the repository at this point in the history
JIRA:STUDIO-7042

GITHUB: bambulab#4015
Change-Id: Ia1910a953f6d18e6bd1e78e6ecb43420a27e9bc9
(cherry picked from commit a60818e982d986d2f4023f2ebd9550b2b5b7e5e5)
  • Loading branch information
MackBambu authored and lanewei120 committed Oct 15, 2024
1 parent 9eb0803 commit 0768e51
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/slic3r/GUI/Gizmos/GLGizmoSimplify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,14 @@ void GLGizmoSimplify::on_render_input_window(float x, float y, float bottom_limi

ImGui::PushItemWidth(ImGui::CalcTextSize("100.00%").x + space_size);

ImGui::BBLDragFloat("##decimate_ratio_input", &m_configuration.decimate_ratio, 0.05f, 0.0f, 0.0f, "%.2f%%");
if (ImGui::BBLDragFloat("##decimate_ratio_input", &m_configuration.decimate_ratio, 0.05f, 0.0f, 0.0f, "%.2f%%")) {
if (m_configuration.decimate_ratio < 0.f)
m_configuration.decimate_ratio = 0.01f;
if (m_configuration.decimate_ratio > 100.f)
m_configuration.decimate_ratio = 100.f;
m_configuration.fix_count_by_ratio(orig_triangle_count);
start_process = true;
}

ImGui::NewLine();
ImGui::SameLine(bottom_left_width + space_size);
Expand Down

0 comments on commit 0768e51

Please sign in to comment.