From 666e9687ce16e386d218692d01eef6979fb9bd69 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Thu, 23 May 2019 12:18:28 +0200 Subject: [PATCH] Fixes PrusaSlicer exits after entering illegal object name #2348 For some reason, showing an error message box from inside the right panel in place editor handler lealds to crashes at least on Windows. Postpoing the dialog with a CallAfter cures that crash. --- src/slic3r/GUI/GUI_ObjectList.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/slic3r/GUI/GUI_ObjectList.cpp b/src/slic3r/GUI/GUI_ObjectList.cpp index 5a837f14d..854f3143a 100644 --- a/src/slic3r/GUI/GUI_ObjectList.cpp +++ b/src/slic3r/GUI/GUI_ObjectList.cpp @@ -2816,8 +2816,10 @@ void ObjectList::OnEditingDone(wxDataViewEvent &event) const auto renderer = dynamic_cast(GetColumn(0)->GetRenderer()); if (renderer->WasCanceled()) - show_error(this, _(L("The supplied name is not valid;")) + "\n" + - _(L("the following characters are not allowed:")) + " <>:/\\|?*\""); + wxTheApp->CallAfter([this]{ + show_error(this, _(L("The supplied name is not valid;")) + "\n" + + _(L("the following characters are not allowed:")) + " <>:/\\|?*\""); + }); } void ObjectList::show_multi_selection_menu()