From d72fba2a6a6af8876c2afa2424745ee7f6f0977e Mon Sep 17 00:00:00 2001 From: Filip Sykala Date: Mon, 8 Nov 2021 15:09:52 +0100 Subject: [PATCH] translation of progress --- src/slic3r/GUI/Gizmos/GLGizmoSimplify.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/slic3r/GUI/Gizmos/GLGizmoSimplify.cpp b/src/slic3r/GUI/Gizmos/GLGizmoSimplify.cpp index e817fe960..6c9e1b9fa 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoSimplify.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoSimplify.cpp @@ -313,12 +313,11 @@ void GLGizmoSimplify::on_render_input_window(float x, float y, float bottom_limi if (is_worker_running) { // apply or preview ImGui::SameLine(m_gui_cfg->bottom_left_width); // draw progress bar - char buf[32]; - sprintf(buf, L("Process %d / 100"), progress); - ImGui::ProgressBar(progress / 100., ImVec2(m_gui_cfg->input_width, 0.f), buf); + std::string progress_text = GUI::format(_L("Process %1% / 100"), std::to_string(progress)); + ImVec2 progress_size(m_gui_cfg->input_width, 0.f); + ImGui::ProgressBar(progress / 100., progress_size, progress_text.c_str()); } m_imgui->end(); - if (start_process) process(); }