FIX: fix the country code not correct issue under pre environment
Change-Id: I5fa3f20949b3f50304d42a50b3819cc5e04c0656
This commit is contained in:
parent
b3575b47d1
commit
0ddd7ed5e7
1 changed files with 8 additions and 7 deletions
|
@ -241,7 +241,7 @@ wxBoxSizer *PreferencesDialog::create_item_region_combobox(wxString title, wxWin
|
|||
auto region_index = e.GetSelection();
|
||||
auto region = local_regions[region_index];
|
||||
|
||||
auto area = "";
|
||||
/*auto area = "";
|
||||
if (region == "CHN" || region == "China")
|
||||
area = "CN";
|
||||
else if (region == "USA")
|
||||
|
@ -253,7 +253,7 @@ wxBoxSizer *PreferencesDialog::create_item_region_combobox(wxString title, wxWin
|
|||
else if (region == "North America")
|
||||
area = "US";
|
||||
else
|
||||
area = "Others";
|
||||
area = "Others";*/
|
||||
|
||||
NetworkAgent* agent = wxGetApp().getAgent();
|
||||
AppConfig* config = GUI::wxGetApp().app_config;
|
||||
|
@ -265,10 +265,11 @@ wxBoxSizer *PreferencesDialog::create_item_region_combobox(wxString title, wxWin
|
|||
return;
|
||||
} else {
|
||||
wxGetApp().request_user_logout();
|
||||
config->set("region", region.ToStdString());
|
||||
auto area = config->get_country_code();
|
||||
if (agent) {
|
||||
agent->set_country_code(area);
|
||||
}
|
||||
config->set("region", region.ToStdString());
|
||||
EndModal(wxID_CANCEL);
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue