From eed15c459b58dd819ca7826a69019e491e7b0702 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Fri, 23 Mar 2018 17:39:19 +0100 Subject: [PATCH] Use asynchronous wxWidgets messages when posting between threads. --- xs/src/slic3r/GUI/BackgroundSlicingProcess.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/xs/src/slic3r/GUI/BackgroundSlicingProcess.cpp b/xs/src/slic3r/GUI/BackgroundSlicingProcess.cpp index 900fdfa43..15da2eb0c 100644 --- a/xs/src/slic3r/GUI/BackgroundSlicingProcess.cpp +++ b/xs/src/slic3r/GUI/BackgroundSlicingProcess.cpp @@ -40,13 +40,7 @@ void BackgroundSlicingProcess::thread_proc() m_print->process(); if (m_print->canceled()) return; - printf("PReparing m_event_sliced_id command\n"); - wxCommandEvent evt(m_event_sliced_id); - printf("Issuing m_event_sliced_id command\n"); - wxQueueEvent(GUI::g_wxPlater, evt.Clone()); - GUI::g_wxPlater->ProcessWindowEvent(evt); - //GUI::g_wxPlater->ProcessEvent(evt); - printf("Done with m_event_sliced_id command\n"); + wxQueueEvent(GUI::g_wxPlater, new wxCommandEvent(m_event_sliced_id)); m_print->export_gcode(m_output_path, m_gcode_preview_data); } catch (std::exception &ex) { error = ex.what();