ENH: Not Reset Homepage When Region Not Change

JIRA: none
Change-Id: Id2da4cb8f694c26036e4756bfc01dbb0c1941ee6
(cherry picked from commit 21a27b32af749601cb5545a59c54b58a8620788c)
This commit is contained in:
zorro.zhang 2024-06-14 20:05:14 +08:00 committed by Lane.Wei
parent 15054c0a6c
commit 95c394bc0a
2 changed files with 8 additions and 0 deletions

View File

@ -35,6 +35,8 @@ namespace GUI {
WebViewPanel::WebViewPanel(wxWindow *parent)
: wxPanel(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize)
{
m_Region = wxGetApp().app_config->get_country_code();
wxString UrlLeft = wxString::Format("file://%s/web/homepage3/left.html", from_u8(resources_dir()));
wxString UrlRight = wxString::Format("file://%s/web/homepage3/home.html", from_u8(resources_dir()));
@ -269,6 +271,11 @@ WebViewPanel::~WebViewPanel()
void WebViewPanel::ResetWholePage()
{
std::string tmp_Region = wxGetApp().app_config->get_country_code();
if (tmp_Region == m_Region) return;
m_Region = tmp_Region;
//left
if (m_browserLeft != nullptr && m_leftfirst) m_browserLeft->Reload();

View File

@ -127,6 +127,7 @@ public:
void update_mode();
private:
std::string m_Region;
wxBoxSizer *topsizer;