mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-12 10:09:03 +08:00
Fix for #8850 - Incorrect display STL file name if not western coding page characters used
This commit is contained in:
parent
0b8d7380ff
commit
10cc836e3f
@ -834,14 +834,14 @@ void GLCanvas3D::Labels::render(const std::vector<const ModelInstance*>& sorted_
|
|||||||
imgui.begin(owner.title, ImGuiWindowFlags_NoMouseInputs | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoMove);
|
imgui.begin(owner.title, ImGuiWindowFlags_NoMouseInputs | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoMove);
|
||||||
ImGui::BringWindowToDisplayFront(ImGui::GetCurrentWindow());
|
ImGui::BringWindowToDisplayFront(ImGui::GetCurrentWindow());
|
||||||
float win_w = ImGui::GetWindowWidth();
|
float win_w = ImGui::GetWindowWidth();
|
||||||
float label_len = imgui.calc_text_size(owner.label).x;
|
float label_len = ImGui::CalcTextSize(owner.label.c_str()).x;
|
||||||
ImGui::SetCursorPosX(0.5f * (win_w - label_len));
|
ImGui::SetCursorPosX(0.5f * (win_w - label_len));
|
||||||
ImGui::AlignTextToFramePadding();
|
ImGui::AlignTextToFramePadding();
|
||||||
imgui.text(owner.label);
|
imgui.text(owner.label);
|
||||||
|
|
||||||
if (!owner.print_order.empty()) {
|
if (!owner.print_order.empty()) {
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
float po_len = imgui.calc_text_size(owner.print_order).x;
|
float po_len = ImGui::CalcTextSize(owner.print_order.c_str()).x;
|
||||||
ImGui::SetCursorPosX(0.5f * (win_w - po_len));
|
ImGui::SetCursorPosX(0.5f * (win_w - po_len));
|
||||||
ImGui::AlignTextToFramePadding();
|
ImGui::AlignTextToFramePadding();
|
||||||
imgui.text(owner.print_order);
|
imgui.text(owner.print_order);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user