From 991632add5344f4275609963564ef5bb73335887 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Wed, 30 Jan 2019 19:48:26 +0100 Subject: [PATCH] GLCanvas3d::on_render(): if not intialized yet, Call render directly, so it gets initialized immediately, not from On Idle handler. --- src/slic3r/GUI/GLCanvas3D.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index 299341cd8..e2cee2ce9 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -5657,7 +5657,11 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt) void GLCanvas3D::on_paint(wxPaintEvent& evt) { - m_dirty = true; + if (m_initialized) + m_dirty = true; + else + // Call render directly, so it gets initialized immediately, not from On Idle handler. + this->render(); } void GLCanvas3D::on_key_down(wxKeyEvent& evt)