Pronibit after on show function when switching connect from notification

This commit is contained in:
David Kocik 2025-01-30 08:26:45 +01:00 committed by Lukas Matena
parent 464a3b8c5e
commit bd3c863d87
3 changed files with 7 additions and 0 deletions

View File

@ -876,6 +876,7 @@ void MainFrame::show_connect_tab(const wxString& url)
if (!m_connect_webview_added) {
return;
}
m_connect_webview->prohibit_after_show_func_once();
m_tabpanel->SetSelection(m_tabpanel->FindPage(m_connect_webview));
m_connect_webview->set_load_default_url_on_next_error(true);
m_connect_webview->load_url(url);

View File

@ -232,6 +232,10 @@ void WebViewPanel::on_show(wxShowEvent& evt)
return;
}
if (m_after_show_func_prohibited_once) {
m_after_show_func_prohibited_once = false;
return;
}
after_on_show(evt);
}

View File

@ -76,6 +76,7 @@ public:
void on_app_quit_event(const std::string& message_data);
void on_app_minimize_event(const std::string& message_data);
void prohibit_after_show_func_once() {m_after_show_func_prohibited_once = true; }
protected:
virtual void late_create();
virtual void define_css();
@ -112,6 +113,7 @@ protected:
wxString m_response_js;
wxString m_default_url;
bool m_reached_default_url {false};
bool m_after_show_func_prohibited_once {false};
std::string m_loading_html;
std::string m_error_html;