mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-10 16:27:54 -06:00
FIX:need a new frame when reload fonts
Change-Id: Ib59359fd1dd327a1e29990b5e774779fa672e04d
This commit is contained in:
parent
4700362f10
commit
06e3c22b92
2 changed files with 13 additions and 0 deletions
|
@ -255,10 +255,17 @@ void GLGizmoText::on_render_input_window(float x, float y, float bottom_limit)
|
||||||
ImGui::SameLine(offset);
|
ImGui::SameLine(offset);
|
||||||
bool add_clicked = m_imgui->button(_L("Add"));
|
bool add_clicked = m_imgui->button(_L("Add"));
|
||||||
if (add_clicked) {
|
if (add_clicked) {
|
||||||
|
m_imgui->disabled_end();
|
||||||
|
GizmoImguiEnd();
|
||||||
|
ImGui::PopStyleVar();
|
||||||
|
ImGuiWrapper::pop_toolbar_style();
|
||||||
|
|
||||||
TriangleMesh mesh;
|
TriangleMesh mesh;
|
||||||
load_text_shape(m_text, m_font_name.c_str(), m_font_size, m_thickness, m_bold, m_italic, mesh);
|
load_text_shape(m_text, m_font_name.c_str(), m_font_size, m_thickness, m_bold, m_italic, mesh);
|
||||||
ObjectList* obj_list = wxGetApp().obj_list();
|
ObjectList* obj_list = wxGetApp().obj_list();
|
||||||
obj_list->load_mesh_part(mesh, "text_shape");
|
obj_list->load_mesh_part(mesh, "text_shape");
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
m_imgui->disabled_end();
|
m_imgui->disabled_end();
|
||||||
|
|
||||||
|
|
|
@ -2275,9 +2275,15 @@ void ImGuiWrapper::destroy_font()
|
||||||
|
|
||||||
void ImGuiWrapper::destroy_fonts_texture() {
|
void ImGuiWrapper::destroy_fonts_texture() {
|
||||||
if (m_font_another_texture != 0) {
|
if (m_font_another_texture != 0) {
|
||||||
|
if (m_new_frame_open) {
|
||||||
|
render();
|
||||||
|
}
|
||||||
init_font(true);
|
init_font(true);
|
||||||
glsafe(::glDeleteTextures(1, &m_font_another_texture));
|
glsafe(::glDeleteTextures(1, &m_font_another_texture));
|
||||||
m_font_another_texture = 0;
|
m_font_another_texture = 0;
|
||||||
|
if (!m_new_frame_open) {
|
||||||
|
new_frame();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue