mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-01 05:01:59 +08:00
Wizard login page fix.
This commit is contained in:
parent
4f317e540a
commit
24ce924ca6
@ -92,7 +92,8 @@ case type: \
|
|||||||
void ConfigWizardWebViewPage::load_error_page() {
|
void ConfigWizardWebViewPage::load_error_page() {
|
||||||
if (!m_browser)
|
if (!m_browser)
|
||||||
return;
|
return;
|
||||||
|
if (m_vetoed)
|
||||||
|
return;
|
||||||
m_browser->Stop();
|
m_browser->Stop();
|
||||||
m_load_error_page = true;
|
m_load_error_page = true;
|
||||||
}
|
}
|
||||||
@ -105,7 +106,7 @@ void ConfigWizardWebViewPage::on_idle(wxIdleEvent &WXUNUSED(evt)) {
|
|||||||
} else {
|
} else {
|
||||||
wxSetCursor(wxNullCursor);
|
wxSetCursor(wxNullCursor);
|
||||||
|
|
||||||
if (m_load_error_page) {
|
if (!m_vetoed && m_load_error_page) {
|
||||||
m_load_error_page = false;
|
m_load_error_page = false;
|
||||||
m_browser->LoadURL(GUI::format_wxstr(
|
m_browser->LoadURL(GUI::format_wxstr(
|
||||||
"file://%1%/web/connection_failed.html",
|
"file://%1%/web/connection_failed.html",
|
||||||
@ -121,6 +122,7 @@ void ConfigWizardWebViewPage::on_navigation_request(wxWebViewEvent &evt)
|
|||||||
wxString url = evt.GetURL();
|
wxString url = evt.GetURL();
|
||||||
if (url.starts_with(L"prusaslicer")) {
|
if (url.starts_with(L"prusaslicer")) {
|
||||||
evt.Veto();
|
evt.Veto();
|
||||||
|
m_vetoed = true;
|
||||||
wxPostEvent(wxGetApp().plater(), Event<std::string>(EVT_LOGIN_VIA_WIZARD, into_u8(url)));
|
wxPostEvent(wxGetApp().plater(), Event<std::string>(EVT_LOGIN_VIA_WIZARD, into_u8(url)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -60,6 +60,7 @@ private:
|
|||||||
wxBoxSizer *m_browser_sizer{nullptr};
|
wxBoxSizer *m_browser_sizer{nullptr};
|
||||||
wxStaticText *m_text{nullptr};
|
wxStaticText *m_text{nullptr};
|
||||||
bool m_load_error_page{false};
|
bool m_load_error_page{false};
|
||||||
|
bool m_vetoed{false};
|
||||||
};
|
};
|
||||||
|
|
||||||
}} // namespace Slic3r::GUI
|
}} // namespace Slic3r::GUI
|
||||||
|
Loading…
x
Reference in New Issue
Block a user