mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-08-30 21:36:57 +00:00
feature code format.
This commit is contained in:
@@ -411,7 +411,7 @@ bool HttpServer::is_healthy()
|
|||||||
|
|
||||||
if (!ec) {
|
if (!ec) {
|
||||||
test_socket.close();
|
test_socket.close();
|
||||||
BOOST_LOG_TRIVIAL(error) << "Health check passed: test connection successful on port " << port;
|
BOOST_LOG_TRIVIAL(debug) << "Health check passed: test connection successful on port " << port;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,8 +28,10 @@ PrinterWebView::PrinterWebView(wxWindow *parent)
|
|||||||
|
|
||||||
wxBoxSizer* topsizer = new wxBoxSizer(wxVERTICAL);
|
wxBoxSizer* topsizer = new wxBoxSizer(wxVERTICAL);
|
||||||
|
|
||||||
|
wxString url = wxString::FromUTF8(LOCALHOST_URL + std::to_string(PAGE_HTTP_PORT) + "/web/flutter_web/index.html?path=2");
|
||||||
|
auto real_url = wxGetApp().get_international_url(url);
|
||||||
// Create the webview
|
// Create the webview
|
||||||
m_browser = WebView::CreateWebView(this, "");
|
m_browser = WebView::CreateWebView(this, real_url);
|
||||||
if (m_browser == nullptr) {
|
if (m_browser == nullptr) {
|
||||||
wxLogError("Could not init m_browser");
|
wxLogError("Could not init m_browser");
|
||||||
return;
|
return;
|
||||||
@@ -45,16 +47,6 @@ PrinterWebView::PrinterWebView(wxWindow *parent)
|
|||||||
|
|
||||||
update_mode();
|
update_mode();
|
||||||
|
|
||||||
// Log backend information
|
|
||||||
/* m_browser->GetUserAgent() may lead crash
|
|
||||||
if (wxGetApp().get_mode() == comDevelop) {
|
|
||||||
wxLogMessage(wxWebView::GetBackendVersionInfo().ToString());
|
|
||||||
wxLogMessage("Backend: %s Version: %s", m_browser->GetClassInfo()->GetClassName(),
|
|
||||||
wxWebView::GetBackendVersionInfo().ToString());
|
|
||||||
wxLogMessage("User Agent: %s", m_browser->GetUserAgent());
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
//Zoom
|
//Zoom
|
||||||
m_zoomFactor = 100;
|
m_zoomFactor = 100;
|
||||||
|
|
||||||
@@ -90,10 +82,9 @@ void PrinterWebView::load_url(wxString& url, wxString apikey)
|
|||||||
wxGetApp().fltviews().remove_printer_view(this);
|
wxGetApp().fltviews().remove_printer_view(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_browser->Show();
|
||||||
m_browser->LoadURL(url);
|
m_browser->LoadURL(url);
|
||||||
|
|
||||||
m_browser->Show();
|
|
||||||
//m_browser->SetFocus();
|
|
||||||
UpdateState();
|
UpdateState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user