From cbd8ce98d5b5c044ab4cbda2479c0f5e77490e3f Mon Sep 17 00:00:00 2001 From: Lam Wei Lun Date: Fri, 16 Oct 2026 17:55:37 +0800 Subject: [PATCH] Keep the texture picker redrawing while thumbnails load Marking the canvas dirty from inside the render does not schedule another idle pass, so deferred thumbnails waited for the next mouse event. Asking for an extra frame does. --- src/slic3r/GUI/Gizmos/GLGizmoTextureDisplacement.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/slic3r/GUI/Gizmos/GLGizmoTextureDisplacement.cpp b/src/slic3r/GUI/Gizmos/GLGizmoTextureDisplacement.cpp index 646a23912a..7f0019f86b 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoTextureDisplacement.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoTextureDisplacement.cpp @@ -4364,7 +4364,7 @@ void GLGizmoTextureDisplacement::render_texture_library_popup(const ImVec2 &pane // The selected tile is centred even when it is off screen, so it is drawn and loaded next frame. if (current && m_picker_reveal_selected) { ImGui::SetScrollFromPosY(0.5f * (rect_min.y + rect_max.y) - ImGui::GetWindowPos().y, 0.5f); - m_parent.set_as_dirty(); + m_parent.request_extra_frame(); } if (!ImGui::IsRectVisible(rect_min, rect_max)) continue; @@ -4597,7 +4597,7 @@ void GLGizmoTextureDisplacement::render_texture_library_popup(const ImVec2 &pane ImGui::PopTextWrapPos(); } if (loads_deferred) - m_parent.set_as_dirty(); + m_parent.request_extra_frame(); // Done whether or not the current texture was drawn: one in a collapsed section stays where it is. m_picker_reveal_selected = false; ImGui::EndChild();