diff --git a/src/imgui/imgui_widgets.cpp b/src/imgui/imgui_widgets.cpp index 22cea0b3f..d68c22075 100644 --- a/src/imgui/imgui_widgets.cpp +++ b/src/imgui/imgui_widgets.cpp @@ -289,13 +289,13 @@ void ImGui::TextAlignCenter(const char *label) ImGui::SameLine(ImGui::GetCursorPos().x + (item_width - font_size) / 2); if ('X' == *label) - ImGui::TextColored(ImVec4(1.0, 0.0, 0.0, 1.0),label); + ImGui::TextColored(ImVec4(1.0, 0.0, 0.0, 1.0), "%s", label); else if ('Y' == *label) - ImGui::TextColored(ImVec4(0.0, 0.6, 0.2, 1.0),label); + ImGui::TextColored(ImVec4(0.0, 0.6, 0.2, 1.0), "%s", label); else if ('Z' == *label) - ImGui::TextColored(ImVec4(0.0, 0.0, 1.0, 1.0),label); + ImGui::TextColored(ImVec4(0.0, 0.0, 1.0, 1.0), "%s", label); else - ImGui::Text(label); + ImGui::Text("%s", label); } void ImGui::TextV(const char* fmt, va_list args) diff --git a/src/slic3r/Config/DispConfig.cpp b/src/slic3r/Config/DispConfig.cpp index 02fa624e6..77a1741d4 100644 --- a/src/slic3r/Config/DispConfig.cpp +++ b/src/slic3r/Config/DispConfig.cpp @@ -415,7 +415,7 @@ int DispConfig::popupButton(const std::string& name, ButtonConfig bcfg ImVec2 DispConfig::boldText(const std::string&str,float scale) { Loc_pushBoldStyle(scale); auto sz = ImGui::CalcTextSize(str.c_str()); - ImGui::Text(str.c_str()); + ImGui::Text("%s", str.c_str()); Loc_popBoldStyle(scale); return sz; } @@ -485,4 +485,4 @@ ImVec4 DispConfig::getColor(ColorType ct) { return color.Value; } -}} \ No newline at end of file +}} diff --git a/src/slic3r/GUI/GCodeViewer.cpp b/src/slic3r/GUI/GCodeViewer.cpp index 7a654207a..a3fe5f5c7 100644 --- a/src/slic3r/GUI/GCodeViewer.cpp +++ b/src/slic3r/GUI/GCodeViewer.cpp @@ -4917,7 +4917,7 @@ class GcodeHelper ImGui::Dummy(ImVec2(0, 3)); auto timestr = short_time(get_time_dhms(time_mode.time)); ::sprintf(buf, "%s:%s", _u8L("Printing Time").c_str(), (char*)timestr.c_str()); - ImGui::Text(buf); + ImGui::Text("%s", buf); ImGui::SameLine(160 * view_scale); ::sprintf(buf, imperial_units ? " %s:%.2f oz" : " %s:%.2f g", _u8L("Material Wt").c_str(), ps.total_weight / unit_conver); @@ -5742,7 +5742,7 @@ void GCodeViewer::render(int canvas_width, int canvas_height) ImVec2 p_start = window->DC.CursorPos; bool hover_text = ImGui::IsMouseHoveringRect(p_start, ImVec2(p_start.x + labelsz.x, p_start.y + labelsz.y)); ImVec4 text_color = hover_text ? ImGuiWrapper::COL_CREALITY : ImGui::GetStyleColorVec4(ImGuiCol_Text); - ImGui::TextColored(text_color, label.c_str()); + ImGui::TextColored(text_color, "%s", label.c_str()); ImVec2 textPos = ImGui::GetItemRectMin(); ImGui::GetWindowDrawList()->AddLine(ImVec2(textPos.x, textPos.y + labelsz.y), @@ -5774,7 +5774,7 @@ void GCodeViewer::render(int canvas_width, int canvas_height) ImGui::RenderFrame(p_min, p_max, sw_bg, true, h * 0.5f); if (ImGui::IsMouseHoveringRect(p_start, p_max)) { - ImGui::SetTooltip(_u8L("In lite mode, only the essential toolpath data is displayed.\nIf you need to view internal parameters such as infill, please disable this mode and re-slice the model.").c_str()); + ImGui::SetTooltip("In lite mode, only the essential toolpath data is displayed.\nIf you need to view internal parameters such as infill, please disable this mode and re-slice the model."); } if (is_lite_mode) { diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index 0f11aae11..ef7030c24 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -264,7 +264,7 @@ void GLCanvas3D::LayersEditing::render_variable_layer_height_dialog(const GLCanv ImGui::PushItemWidth(max_text_size); ImGui::AlignTextToFramePadding(); - ImGui::Text(quality_speed_text.c_str()); + ImGui::Text("%s", quality_speed_text.c_str()); ImGui::SameLine(max_text_size + ImGui::GetStyle().ItemSpacing.x + ImGui::GetStyle().WindowPadding.x); @@ -328,7 +328,7 @@ void GLCanvas3D::LayersEditing::render_variable_layer_height_dialog(const GLCanv ImGui::PushItemWidth(max_text_size); ImGui::AlignTextToFramePadding(); - ImGui::Text(smooth_text.c_str()); + ImGui::Text("%s", smooth_text.c_str()); ImGui::SameLine(max_text_size + ImGui::GetStyle().ItemSpacing.x + ImGui::GetStyle().WindowPadding.x); @@ -11134,18 +11134,18 @@ void GLCanvas3D::_render_paint_toolbar() const ImVec2 number_label_size = ImGui::CalcTextSize(std::to_string(i + 1).c_str()); ImGui::SetCursorPosY(cursor_y + text_offset_y); ImGui::SetCursorPosX(spacing + i * (spacing + button_size.x) + (button_size.x - number_label_size.x) / 2); - ImGui::TextColored(text_color, std::to_string(i + 1).c_str()); + ImGui::TextColored(text_color, "%d", i + 1); imgui.pop_bold_font(); ImVec2 filament_first_line_label_size = ImGui::CalcTextSize(filament_text_first_line[i].c_str()); ImGui::SetCursorPosY(cursor_y + text_offset_y + number_label_size.y); ImGui::SetCursorPosX(spacing + i * (spacing + button_size.x) + (button_size.x - filament_first_line_label_size.x) / 2); - ImGui::TextColored(text_color, filament_text_first_line[i].c_str()); + ImGui::TextColored(text_color, "%s", filament_text_first_line[i].c_str()); ImVec2 filament_second_line_label_size = ImGui::CalcTextSize(filament_text_second_line[i].c_str()); ImGui::SetCursorPosY(cursor_y + text_offset_y + number_label_size.y + filament_first_line_label_size.y); ImGui::SetCursorPosX(spacing + i * (spacing + button_size.x) + (button_size.x - filament_second_line_label_size.x) / 2); - ImGui::TextColored(text_color, filament_text_second_line[i].c_str()); + ImGui::TextColored(text_color, "%s", filament_text_second_line[i].c_str()); } if (ImGui::GetWindowWidth() == constraint_window_width) { @@ -11298,10 +11298,10 @@ void GLCanvas3D::_render_assemble_info() const double size1 = m_selection.get_bounding_box().size()(1); double size2 = m_selection.get_bounding_box().size()(2); if (!m_selection.is_empty()) { - ImGui::Text(_L("Volume:").ToUTF8()); + ImGui::Text("Volume:"); ImGui::SameLine(caption_max); ImGui::Text("%.2f", size0 * size1 * size2); - ImGui::Text(_L("Size:").ToUTF8()); + ImGui::Text("Size:"); ImGui::SameLine(caption_max); ImGui::Text("%.2f x %.2f x %.2f", size0, size1, size2); } diff --git a/src/slic3r/GUI/GUI_ObjectList.cpp b/src/slic3r/GUI/GUI_ObjectList.cpp index bf63d1074..4ace5253b 100644 --- a/src/slic3r/GUI/GUI_ObjectList.cpp +++ b/src/slic3r/GUI/GUI_ObjectList.cpp @@ -6301,7 +6301,7 @@ void ObjectList::render_plate(ObjectDataViewModelNode* plate) if (ImGui::IsItemHovered()) { ImVec4 text_color = is_dark ? ImVec4(1.0, 1.0, 1.0, 1.0) : ImVec4(0.2, 0.2, 0.2, 1.0); ImGui::PushStyleColor(ImGuiCol_Text, text_color); - ImGui::SetTooltip(_u8L("Click the icon to reset all settings of the object").c_str()); + ImGui::SetTooltip("Click the icon to reset all settings of the object"); ImGui::PopStyleColor(); } @@ -6464,7 +6464,7 @@ void ObjectList::render_generic_columns(ObjectDataViewModelNode* node) if (ImGui::IsItemHovered()) { ImVec4 text_color = is_dark ? ImVec4(1.0, 1.0, 1.0, 1.0) : ImVec4(0.2, 0.2, 0.2, 1.0); ImGui::PushStyleColor(ImGuiCol_Text, text_color); - ImGui::SetTooltip(_u8L("Click the icon to toggle printable property of the object").c_str()); + ImGui::SetTooltip("Click the icon to toggle printable property of the object"); ImGui::PopStyleColor(); } ImGui::SameLine(0, 0); @@ -6496,7 +6496,7 @@ void ObjectList::render_generic_columns(ObjectDataViewModelNode* node) if (tooltip.length() > 0 && ImGui::IsItemHovered()) { ImVec4 text_color = is_dark ? ImVec4(1.0, 1.0, 1.0, 1.0) : ImVec4(0.2, 0.2, 0.2, 1.0); ImGui::PushStyleColor(ImGuiCol_Text, text_color); - ImGui::SetTooltip(tooltip.ToUTF8().data()); + ImGui::SetTooltip("%s", tooltip.ToUTF8().data()); ImGui::PopStyleColor(); } ImGui::SameLine(0, 0); @@ -6579,7 +6579,7 @@ void ObjectList::render_generic_columns(ObjectDataViewModelNode* node) if (ImGui::IsItemHovered()) { ImVec4 text_color = is_dark ? ImVec4(1.0, 1.0, 1.0, 1.0) : ImVec4(0.2, 0.2, 0.2, 1.0); ImGui::PushStyleColor(ImGuiCol_Text, text_color); - ImGui::SetTooltip(node_name); + ImGui::SetTooltip("%s", node_name); ImGui::PopStyleColor(); } @@ -6615,7 +6615,7 @@ void ObjectList::render_generic_columns(ObjectDataViewModelNode* node) if (ImGui::IsItemHovered()) { ImVec4 text_color = is_dark ? ImVec4(1.0, 1.0, 1.0, 1.0) : ImVec4(0.2, 0.2, 0.2, 1.0); ImGui::PushStyleColor(ImGuiCol_Text, text_color); - ImGui::SetTooltip(node_name); + ImGui::SetTooltip("%s", node_name); ImGui::PopStyleColor(); } @@ -6648,7 +6648,7 @@ void ObjectList::render_generic_columns(ObjectDataViewModelNode* node) if (ImGui::IsItemHovered()) { ImVec4 text_color = is_dark ? ImVec4(1.0, 1.0, 1.0, 1.0) : ImVec4(0.2, 0.2, 0.2, 1.0); ImGui::PushStyleColor(ImGuiCol_Text, text_color); - ImGui::SetTooltip(node_name); + ImGui::SetTooltip("%s", node_name); ImGui::PopStyleColor(); } @@ -6737,7 +6737,7 @@ void ObjectList::render_generic_columns(ObjectDataViewModelNode* node) if (is_view3D && ImGui::IsItemHovered()) { ImVec4 text_color = is_dark ? ImVec4(1.0, 1.0, 1.0, 1.0) : ImVec4(0.2, 0.2, 0.2, 1.0); ImGui::PushStyleColor(ImGuiCol_Text, text_color); - ImGui::SetTooltip(_u8L("Click the icon to edit support painting of the object").c_str()); + ImGui::SetTooltip("Click the icon to edit support painting of the object"); ImGui::PopStyleColor(); } @@ -6780,7 +6780,7 @@ void ObjectList::render_generic_columns(ObjectDataViewModelNode* node) if (is_view3D && ImGui::IsItemHovered()) { ImVec4 text_color = is_dark ? ImVec4(1.0, 1.0, 1.0, 1.0) : ImVec4(0.2, 0.2, 0.2, 1.0); ImGui::PushStyleColor(ImGuiCol_Text, text_color); - ImGui::SetTooltip(_u8L("Click the icon to edit color painting of the object").c_str()); + ImGui::SetTooltip("Click the icon to edit color painting of the object"); ImGui::PopStyleColor(); } @@ -6824,7 +6824,7 @@ void ObjectList::render_generic_columns(ObjectDataViewModelNode* node) if (is_view3D && ImGui::IsItemHovered()) { ImVec4 text_color = is_dark ? ImVec4(1.0, 1.0, 1.0, 1.0) : ImVec4(0.2, 0.2, 0.2, 1.0); ImGui::PushStyleColor(ImGuiCol_Text, text_color); - ImGui::SetTooltip(_u8L("Click the icon to shift this object to the bed").c_str()); + ImGui::SetTooltip("Click the icon to shift this object to the bed"); ImGui::PopStyleColor(); } @@ -6867,7 +6867,7 @@ void ObjectList::render_generic_columns(ObjectDataViewModelNode* node) if (is_view3D && ImGui::IsItemHovered()) { ImVec4 text_color = is_dark ? ImVec4(1.0, 1.0, 1.0, 1.0) : ImVec4(0.2, 0.2, 0.2, 1.0); ImGui::PushStyleColor(ImGuiCol_Text, text_color); - ImGui::SetTooltip(_u8L("Click the icon to reset all settings of the object").c_str()); + ImGui::SetTooltip("Click the icon to reset all settings of the object"); ImGui::PopStyleColor(); } @@ -7045,14 +7045,14 @@ void ObjectList::render_generic_columns(ObjectDataViewModelNode* node) float x = pos.x + (item_width - text_size.x) * 0.5f; ImGui::SetCursorPos(ImVec2(x, pos.y + style.FramePadding.y)); - ImGui::Text(ext_name.c_str()); + ImGui::Text("%s", ext_name.c_str()); if (need_tooltips) { if (ImGui::IsItemHovered()) { ImVec4 text_color = is_dark ? ImVec4(1.0, 1.0, 1.0, 1.0) : ImVec4(0.2, 0.2, 0.2, 1.0); ImGui::PushStyleColor(ImGuiCol_Text, text_color); - ImGui::SetTooltip(ext_names[ext_idx].c_str()); + ImGui::SetTooltip("%s", ext_names[ext_idx].c_str()); ImGui::PopStyleColor(); } @@ -7215,13 +7215,13 @@ void GUI::ObjectList::render_current_device_name(const float max_right) std::string show_text = _u8L("Current device:") + " " + device_name; std::string remake_text = remake_text_to_fit_size(show_text); - ImGui::TextColored(ImGuiWrapper::COL_CREALITY, remake_text.c_str()); + ImGui::TextColored(ImGuiWrapper::COL_CREALITY, "%s", remake_text.c_str()); if (ImGui::IsItemHovered()) { bool is_dark = wxGetApp().dark_mode(); ImVec4 text_color = is_dark ? ImVec4(1.0, 1.0, 1.0, 1.0) : ImVec4(0.2, 0.2, 0.2, 1.0); ImGui::PushStyleColor(ImGuiCol_Text, text_color); - ImGui::SetTooltip(_u8L("Can be set in the \"Worktop\" or \"Device\"").c_str()); + ImGui::SetTooltip("Can be set in the \"Worktop\" or \"Device\""); ImGui::PopStyleColor(); } } @@ -7488,7 +7488,7 @@ void ObjectList::render_printer_preset_by_ImGui() { if (ImGui::IsItemHovered()) { - ImGui::SetTooltip(combo_preview_value); + ImGui::SetTooltip("%s", combo_preview_value); ImGui::PushStyleColor(ImGuiCol_Border, ImGuiWrapper::COL_CREALITY); } else { ImGui::PushStyleColor(ImGuiCol_Border, border_color); @@ -7518,7 +7518,7 @@ void ObjectList::render_printer_preset_by_ImGui() if (ImGui::IsItemHovered()) { ImVec4 text_color = is_dark ? ImVec4(1.0, 1.0, 1.0, 1.0) : ImVec4(0.2, 0.2, 0.2, 1.0); ImGui::PushStyleColor(ImGuiCol_Text, text_color); - ImGui::SetTooltip(_u8L("Click to edit preset").c_str()); + ImGui::SetTooltip("Click to edit preset"); ImGui::PopStyleColor(); } @@ -7575,7 +7575,7 @@ void ObjectList::render_printer_preset_by_ImGui() } ImGui::PopStyleVar(1); if (ImGui::IsItemHovered() && current_device.valid) - ImGui::SetTooltip((current_device.name.empty()? current_device.address : current_device.name).c_str()); + ImGui::SetTooltip("%s", (current_device.name.empty()? current_device.address : current_device.name).c_str()); // draw device list popup ImVec2 popupSize{(336 + 15) * scale, 360 * scale}; @@ -7625,7 +7625,7 @@ void ObjectList::render_printer_preset_by_ImGui() if (!bed_types.empty()) { // Bed type ImGui::AlignTextToFramePadding(); - ImGui::Text(_u8L("Bed type").c_str()); + ImGui::Text("Bed type"); ImGui::SameLine(); float bed_type_combo_width = 280 * scale - ImGui::GetItemRectSize().x - style.FramePadding.x * 2; { @@ -7709,7 +7709,7 @@ void ObjectList::render_printer_preset_by_ImGui() boost::log::core::get()->flush(); } - ImGui::SetTooltip(combo_preview_value); + ImGui::SetTooltip("%s", combo_preview_value); ImGui::PushStyleColor(ImGuiCol_Border, ImGuiWrapper::COL_CREALITY); } else { ImGui::PushStyleColor(ImGuiCol_Border, border_color); @@ -8121,9 +8121,9 @@ void ObjectList::draw_device_list_popup() auto winWidth = ImGui::GetCurrentWindow()->Size.x; ImGui::SetCursorPosX(ImGui::GetCursorPosX() + winWidth / 2 - label_size1.x / 2); ImGui::SetCursorPosY(ImGui::GetCursorPosY() + 40 * scale / 2 - ImGui::GetFontSize() / 2); - ImGui::Text(label1.c_str()); + ImGui::Text("%s", label1.c_str()); ImGui::SetCursorPosX(ImGui::GetCursorPosX() + winWidth / 2 - (label_size11.x + label_size2.x) / 2); - ImGui::Text(label11.c_str()); + ImGui::Text("%s", label11.c_str()); ImGui::SameLine(); ImVec4 label_color = {0.0824, 0.7529, 0.3490, 1.0000}; @@ -8279,13 +8279,13 @@ void ObjectList::draw_device_list_content() auto textSize2 = ImGui::CalcTextSize(showText2); ImGui::SameLine(curWidth + colDesigneWidth[col] / 2 - textSize.x / 2); ImGui::SetCursorPosY(originCursorY + rowHeight / 2 - textSize.y); - ImGui::TextColored(is_dark ? ImVec4{1.0f, 1.0f, 1.0f, 1.0f} : ImVec4{0.1686f, 0.1686f, 0.1765f, 1.0f}, showText); + ImGui::TextColored(is_dark ? ImVec4{1.0f, 1.0f, 1.0f, 1.0f} : ImVec4{0.1686f, 0.1686f, 0.1765f, 1.0f}, "%s", showText); if (ImGui::IsItemHovered()) { - ImGui::SetTooltip(it.second.name.c_str()); + ImGui::SetTooltip("%s", it.second.name.c_str()); } ImGui::SameLine(curWidth + colDesigneWidth[col] / 2 - textSize2.x / 2); ImGui::SetCursorPosY(originCursorY + rowHeight / 2); - ImGui::TextColored(is_dark ? ImVec4{0.6824, 0.6824, 0.6980, 1.0f} : ImVec4{0.3059f, 0.3490f, 0.4118f, 1.0f}, showText2); + ImGui::TextColored(is_dark ? ImVec4{0.6824, 0.6824, 0.6980, 1.0f} : ImVec4{0.3059f, 0.3490f, 0.4118f, 1.0f}, "%s", showText2); curWidth += colDesigneWidth[col]; ++col; @@ -8304,7 +8304,7 @@ void ObjectList::draw_device_list_content() textSize = ImGui::CalcTextSize(stateList[stateText].c_str()); ImGui::SameLine(curWidth + colDesigneWidth[col] / 2 - ImGui::CalcTextSize(stateList[stateText].c_str()).x / 2); ImGui::SetCursorPosY(originCursorY + rowHeight / 2 - textSize.y / 2); - ImGui::TextColored(colorList[stateColor], stateList[stateText].c_str()); + ImGui::TextColored(colorList[stateColor], "%s", stateList[stateText].c_str()); ImGui::SetCursorPosY(originCursorY + rowHeight); ImGui::Separator(); diff --git a/src/slic3r/GUI/Gizmos/GLGizmoDrill.cpp b/src/slic3r/GUI/Gizmos/GLGizmoDrill.cpp index dfc715a34..aa65877b0 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoDrill.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoDrill.cpp @@ -641,7 +641,7 @@ void GLGizmoDrill::draw_cp_input_double(const std::string& label, double* v, dou ImGui::PushItemWidth(size.x() - updown_button_size.x - text_size - space * 3.0); ImGui::BBLInputDouble(label.c_str(), v, 0.0f, 0.0f, "%.2f", disable); ImGui::SameLine(0, space); - ImGui::Text(text); + ImGui::Text("%s", text); ImGui::SameLine(0, space); { ImGui::BeginGroup(); diff --git a/src/slic3r/GUI/Gizmos/GLGizmoHollow.cpp b/src/slic3r/GUI/Gizmos/GLGizmoHollow.cpp index 5e132f521..1f48ac3b5 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoHollow.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoHollow.cpp @@ -778,7 +778,7 @@ void GLGizmoHollow::draw_cp_input_double(const std::string& label, double* v, do ImGui::PushItemWidth(size.x() - updown_button_size.x - text_size - space * 3.0); ImGui::BBLInputDouble(label.c_str(), v, 0.0f, 0.0f, "%.1f", disable); ImGui::SameLine(0, space); - ImGui::Text(text); + ImGui::Text("%s", text); ImGui::SameLine(0, space); { ImGui::BeginGroup(); diff --git a/src/slic3r/GUI/Gizmos/GLGizmoMeshBoolean.cpp b/src/slic3r/GUI/Gizmos/GLGizmoMeshBoolean.cpp index 83c9c9bce..cb639bdd9 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoMeshBoolean.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoMeshBoolean.cpp @@ -493,7 +493,7 @@ void GLGizmoMeshBoolean::on_render_input_window(float x, float y, float bottom_l if (m_show_warning) { ImGui::PushTextWrapPos(200); - ImGui::TextWrapped(_u8L(warning_text.c_str()).c_str()); + ImGui::TextWrapped("%s", _u8L(warning_text.c_str()).c_str()); ImGui::PopTextWrapPos(); ImGui::SameLine(0, 0); } diff --git a/src/slic3r/GUI/Gizmos/GLGizmoMmuSegmentation.cpp b/src/slic3r/GUI/Gizmos/GLGizmoMmuSegmentation.cpp index 2728adbe8..21a56faad 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoMmuSegmentation.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoMmuSegmentation.cpp @@ -508,9 +508,9 @@ void GLGizmoMmuSegmentation::on_render_input_window(float x, float y, float bott ImGui::SameLine(button_offset + (button_size.x - label_size.x) / 2.f); ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, {10.0,15.0}); if (gray * 255.f < 80.f) - ImGui::TextColored(ImVec4(1.0f, 1.0f, 1.0f, 1.0f), item_text.c_str()); + ImGui::TextColored(ImVec4(1.0f, 1.0f, 1.0f, 1.0f), "%s", item_text.c_str()); else - ImGui::TextColored(ImVec4(0.0f, 0.0f, 0.0f, 1.0f), item_text.c_str()); + ImGui::TextColored(ImVec4(0.0f, 0.0f, 0.0f, 1.0f), "%s", item_text.c_str()); ImGui::PopStyleVar(); } diff --git a/src/slic3r/GUI/Gizmos/GLGizmoSimplify.cpp b/src/slic3r/GUI/Gizmos/GLGizmoSimplify.cpp index a9602ba95..f44cd1f56 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoSimplify.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoSimplify.cpp @@ -349,7 +349,7 @@ void GLGizmoSimplify::on_render_input_window(float x, float y, float bottom_limi ImGui::BBLProgressBar2(progress / 100., progress_size); ImGui::SameLine(); ImGui::AlignTextToFramePadding(); - ImGui::TextColored(ImVec4(0.42f, 0.42f, 0.42f, 1.00f), progress_text.c_str()); + ImGui::TextColored(ImVec4(0.42f, 0.42f, 0.42f, 1.00f), "%s", progress_text.c_str()); ImGui::SameLine(bottom_left_width + slider_width + m_imgui->scaled(1.0f)); } else { ImGui::Dummy(ImVec2(bottom_left_width - space_size, -1));