mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-07-31 09:02:01 +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() {
|
||||
if (!m_browser)
|
||||
return;
|
||||
|
||||
if (m_vetoed)
|
||||
return;
|
||||
m_browser->Stop();
|
||||
m_load_error_page = true;
|
||||
}
|
||||
@ -105,7 +106,7 @@ void ConfigWizardWebViewPage::on_idle(wxIdleEvent &WXUNUSED(evt)) {
|
||||
} else {
|
||||
wxSetCursor(wxNullCursor);
|
||||
|
||||
if (m_load_error_page) {
|
||||
if (!m_vetoed && m_load_error_page) {
|
||||
m_load_error_page = false;
|
||||
m_browser->LoadURL(GUI::format_wxstr(
|
||||
"file://%1%/web/connection_failed.html",
|
||||
@ -121,6 +122,7 @@ void ConfigWizardWebViewPage::on_navigation_request(wxWebViewEvent &evt)
|
||||
wxString url = evt.GetURL();
|
||||
if (url.starts_with(L"prusaslicer")) {
|
||||
evt.Veto();
|
||||
m_vetoed = true;
|
||||
wxPostEvent(wxGetApp().plater(), Event<std::string>(EVT_LOGIN_VIA_WIZARD, into_u8(url)));
|
||||
}
|
||||
}
|
||||
|
@ -60,6 +60,7 @@ private:
|
||||
wxBoxSizer *m_browser_sizer{nullptr};
|
||||
wxStaticText *m_text{nullptr};
|
||||
bool m_load_error_page{false};
|
||||
bool m_vetoed{false};
|
||||
};
|
||||
|
||||
}} // namespace Slic3r::GUI
|
||||
|
Loading…
x
Reference in New Issue
Block a user