From 89ff5d03ebef37bdedda02b61a634a69fe72c02a Mon Sep 17 00:00:00 2001 From: Yuri D'Elia Date: Sat, 18 May 2019 14:52:29 +0200 Subject: [PATCH] Delay refresh until initialized on_idle can be called too early on wxGtk3/X11. Check for m_initialized before refreshing. --- src/slic3r/GUI/GLCanvas3D.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index bb2cb5e2d..48dc2e46e 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -2292,6 +2292,9 @@ void GLCanvas3D::on_size(wxSizeEvent& evt) void GLCanvas3D::on_idle(wxIdleEvent& evt) { + if (!m_initialized) + return; + m_dirty |= m_toolbar.update_items_state(); m_dirty |= m_view_toolbar.update_items_state();