mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-19 04:37:52 -06:00
Fix the random crash at the startup on Macos&&Linux
don't do the post_init when adding script handler of webview Change-Id: I2c766c46bb67347286765dee539657b5efd7f64a
This commit is contained in:
parent
3dbdc40360
commit
c6f0c41213
3 changed files with 9 additions and 1 deletions
|
@ -107,8 +107,12 @@ wxWebView* WebView::CreateWebView(wxWindow * parent, wxString const & url)
|
|||
#ifndef __WIN32__
|
||||
Slic3r::GUI::wxGetApp().CallAfter([webView] {
|
||||
#endif
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ": begin to add script message handler for wx.";
|
||||
Slic3r::GUI::wxGetApp().set_adding_script_handler(true);
|
||||
if (!webView->AddScriptMessageHandler("wx"))
|
||||
wxLogError("Could not add script message handler");
|
||||
Slic3r::GUI::wxGetApp().set_adding_script_handler(false);
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ": finished add script message handler for wx.";
|
||||
#ifndef __WIN32__
|
||||
});
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue