diff --git a/src/slic3r/GUI/WebGuideDialog.cpp b/src/slic3r/GUI/WebGuideDialog.cpp index a125e4110..4e985fc5f 100644 --- a/src/slic3r/GUI/WebGuideDialog.cpp +++ b/src/slic3r/GUI/WebGuideDialog.cpp @@ -354,9 +354,12 @@ void GuideFrame::OnScriptMessage(wxWebViewEvent &evt) { try { wxString strInput = evt.GetString(); + BOOST_LOG_TRIVIAL(trace) << "GuideFrame::OnScriptMessage;OnRecv:" << strInput.c_str(); json j = json::parse(strInput); wxString strCmd = j["command"]; + BOOST_LOG_TRIVIAL(trace) << "GuideFrame::OnScriptMessage;Command:" << strCmd; + if (strCmd == "close_page") { this->EndModal(wxID_CANCEL); } @@ -384,8 +387,10 @@ void GuideFrame::OnScriptMessage(wxWebViewEvent &evt) m_Res["sequence_id"] = "10001"; m_Res["response"] = m_ProfileJson; - wxString strJS = wxString::Format("HandleStudio(%s)", m_Res.dump(-1, ' ', false, json::error_handler_t::ignore)); + //wxString strJS = wxString::Format("HandleStudio(%s)", m_Res.dump(-1, ' ', false, json::error_handler_t::ignore)); + wxString strJS = wxString::Format("HandleStudio(%s)", m_Res.dump(-1, ' ', true)); + BOOST_LOG_TRIVIAL(trace) << "GuideFrame::OnScriptMessage;request_userguide_profile:" << strJS.c_str(); wxGetApp().CallAfter([this,strJS] { RunScript(strJS); }); } else if (strCmd == "request_custom_filaments") { @@ -482,6 +487,7 @@ void GuideFrame::OnScriptMessage(wxWebViewEvent &evt) } } catch (std::exception &e) { // wxMessageBox(e.what(), "json Exception", MB_OK); + BOOST_LOG_TRIVIAL(trace) << "GuideFrame::OnScriptMessage;Error:" << e.what(); } wxString strAll = m_ProfileJson.dump(-1,' ',false, json::error_handler_t::ignore); @@ -968,20 +974,28 @@ bool GuideFrame::run() int GuideFrame::GetFilamentInfo( std::string VendorDirectory, json & pFilaList, std::string filepath, std::string &sVendor, std::string &sType) { //GetStardardFilePath(filepath); + BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " GetFilamentInfo:VendorDirectory - " << VendorDirectory << ", Filepath - "<