Start using string_view in truncate text

This commit is contained in:
Filip Sykala 2022-03-03 08:13:00 +01:00
parent a0dde4651b
commit ad1510a30c
5 changed files with 55 additions and 27 deletions
src/slic3r/GUI/Gizmos

View file

@ -1045,7 +1045,7 @@ void GLGizmoEmboss::draw_rename_style(bool start_rename)
is_unique && !new_name.empty();
ImGuiInputTextFlags flags = ImGuiInputTextFlags_EnterReturnsTrue;
if ((ImGui::InputText("##font name", &new_name, flags) && allow_change) ||
if ((ImGui::InputText(("##font name" + original_style_name).c_str(), &new_name, flags) && allow_change) ||
m_imgui->button(_L("ok"), ImVec2(0.f, 0.f), allow_change)) {
rename_item->name = new_name;
m_font_manager.get_truncated_name() = "";