ENH: Not Reset Homepage When Region Not Change
JIRA: none Change-Id: Id2da4cb8f694c26036e4756bfc01dbb0c1941ee6 (cherry picked from commit 21a27b32af749601cb5545a59c54b58a8620788c)
This commit is contained in:
parent
15054c0a6c
commit
95c394bc0a
|
@ -35,6 +35,8 @@ namespace GUI {
|
||||||
WebViewPanel::WebViewPanel(wxWindow *parent)
|
WebViewPanel::WebViewPanel(wxWindow *parent)
|
||||||
: wxPanel(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize)
|
: 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 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()));
|
wxString UrlRight = wxString::Format("file://%s/web/homepage3/home.html", from_u8(resources_dir()));
|
||||||
|
|
||||||
|
@ -269,6 +271,11 @@ WebViewPanel::~WebViewPanel()
|
||||||
|
|
||||||
void WebViewPanel::ResetWholePage()
|
void WebViewPanel::ResetWholePage()
|
||||||
{
|
{
|
||||||
|
std::string tmp_Region = wxGetApp().app_config->get_country_code();
|
||||||
|
if (tmp_Region == m_Region) return;
|
||||||
|
|
||||||
|
m_Region = tmp_Region;
|
||||||
|
|
||||||
//left
|
//left
|
||||||
if (m_browserLeft != nullptr && m_leftfirst) m_browserLeft->Reload();
|
if (m_browserLeft != nullptr && m_leftfirst) m_browserLeft->Reload();
|
||||||
|
|
||||||
|
|
|
@ -127,6 +127,7 @@ public:
|
||||||
|
|
||||||
void update_mode();
|
void update_mode();
|
||||||
private:
|
private:
|
||||||
|
std::string m_Region;
|
||||||
|
|
||||||
wxBoxSizer *topsizer;
|
wxBoxSizer *topsizer;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue