mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 21:57:22 +08:00
Do not set user agent on webview creation. It caused not loading of the webview edge backend when running 2 different versions of PS.
This commit is contained in:
parent
79a7abeca6
commit
f6e8a1e898
@ -21,8 +21,7 @@ wxWebView* WebView::CreateWebView(wxWindow * parent, const wxString& url)
|
|||||||
if (webView) {
|
if (webView) {
|
||||||
wxString correct_url = url.empty() ? wxString("") : wxURI(url).BuildURI();
|
wxString correct_url = url.empty() ? wxString("") : wxURI(url).BuildURI();
|
||||||
|
|
||||||
#ifdef __WIN32__
|
#ifdef __WIN32_
|
||||||
webView->SetUserAgent(wxString::Format("PrusaSlicer/v%s", SLIC3R_VERSION));
|
|
||||||
webView->Create(parent, wxID_ANY, correct_url, wxDefaultPosition, wxDefaultSize);
|
webView->Create(parent, wxID_ANY, correct_url, wxDefaultPosition, wxDefaultSize);
|
||||||
//We register the wxfs:// protocol for testing purposes
|
//We register the wxfs:// protocol for testing purposes
|
||||||
//webView->RegisterHandler(wxSharedPtr<wxWebViewHandler>(new wxWebViewArchiveHandler("wxfs")));
|
//webView->RegisterHandler(wxSharedPtr<wxWebViewHandler>(new wxWebViewArchiveHandler("wxfs")));
|
||||||
@ -34,7 +33,6 @@ wxWebView* WebView::CreateWebView(wxWindow * parent, const wxString& url)
|
|||||||
// And the memory: file system
|
// And the memory: file system
|
||||||
//webView->RegisterHandler(wxSharedPtr<wxWebViewHandler>(new wxWebViewFSHandler("memory")));
|
//webView->RegisterHandler(wxSharedPtr<wxWebViewHandler>(new wxWebViewFSHandler("memory")));
|
||||||
webView->Create(parent, wxID_ANY, correct_url, wxDefaultPosition, wxDefaultSize);
|
webView->Create(parent, wxID_ANY, correct_url, wxDefaultPosition, wxDefaultSize);
|
||||||
webView->SetUserAgent(wxString::Format("PrusaSlicer/v%s", SLIC3R_VERSION));
|
|
||||||
#endif
|
#endif
|
||||||
#ifndef __WIN32__
|
#ifndef __WIN32__
|
||||||
Slic3r::GUI::wxGetApp().CallAfter([webView] {
|
Slic3r::GUI::wxGetApp().CallAfter([webView] {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user