Remove static run_script function.

This commit is contained in:
David Kocik 2024-04-12 13:58:05 +02:00
parent d72794bde8
commit 7b9d9a33a4
3 changed files with 3 additions and 14 deletions

View File

@ -56,9 +56,3 @@ wxWebView* WebView::CreateWebView(wxWindow * parent, const wxString& url)
}
bool WebView::run_script(wxWebView *webView, wxString const &javascript)
{
webView->RunScriptAsync(javascript);
return true;
}

View File

@ -8,7 +8,6 @@ class wxString;
namespace WebView
{
wxWebView *CreateWebView(wxWindow *parent, const wxString& url);
bool run_script(wxWebView * webView, const wxString& msg);
};
#endif // !slic3r_GUI_WebView_hpp_

View File

@ -318,11 +318,8 @@ void WebViewPanel::run_script(const wxString& javascript)
// Remember the script we run in any case, so the next time the user opens
// the "Run Script" dialog box, it is shown there for convenient updating.
m_javascript = javascript;
if (!m_browser) return;
bool res = WebView::run_script(m_browser, javascript);
BOOST_LOG_TRIVIAL(debug) << "RunScript " << javascript << " " << res;
BOOST_LOG_TRIVIAL(debug) << "RunScript " << javascript;
m_browser->RunScriptAsync(javascript);
}
@ -681,8 +678,7 @@ void WebViewDialog::run_script(const wxString& javascript)
{
if (!m_browser)
return;
// dk_FIXME: Is it ok to discard the return value?
/*bool res = */ WebView::run_script(m_browser, javascript);
m_browser->RunScriptAsync(javascript);
}
PrinterPickWebViewDialog::PrinterPickWebViewDialog(wxWindow* parent, std::string& ret_val)