mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 10:02:12 +00:00
Enable WebView devtools if developer mode is enabled (#6298)
* Enable WebView devtools if developer mode is enabled
This commit is contained in:
@@ -38,6 +38,8 @@ PrinterWebView::PrinterWebView(wxWindow *parent)
|
||||
|
||||
topsizer->Add(m_browser, wxSizerFlags().Expand().Proportion(1));
|
||||
|
||||
update_mode();
|
||||
|
||||
// Log backend information
|
||||
/* m_browser->GetUserAgent() may lead crash
|
||||
if (wxGetApp().get_mode() == comDevelop) {
|
||||
@@ -83,6 +85,12 @@ void PrinterWebView::reload()
|
||||
{
|
||||
m_browser->Reload();
|
||||
}
|
||||
|
||||
void PrinterWebView::update_mode()
|
||||
{
|
||||
m_browser->EnableAccessToDevTools(wxGetApp().app_config->get_bool("developer_mode"));
|
||||
}
|
||||
|
||||
/**
|
||||
* Method that retrieves the current state from the web control and updates the
|
||||
* GUI the reflect this current state.
|
||||
|
||||
Reference in New Issue
Block a user