This commit is contained in:
Zero Fanker 2024-04-07 11:55:49 -04:00
parent 12bc00a79f
commit f24951d3ec
2 changed files with 7 additions and 10 deletions

View file

@ -118,14 +118,13 @@ BOOL CNewMap::OnInitDialog()
CComboBox& house=*((CComboBox*)(GetDlgItem(IDC_HOUSE)));
int i;
for(i=0;i<rules.sections[HOUSES].values.size();i++)
{
house.AddString(*rules.sections[HOUSES].GetValue(i));
for (auto const& [seq, id] : rules[HOUSES]) {
house.AddString(id);
}
m_House=rules.sections[HOUSES].values["0"];
m_House = rules[HOUSES].Nth(0).second;
CComboBox& theater=*((CComboBox*)GetDlgItem(IDC_THEATER));
CComboBox& theater = *((CComboBox*)GetDlgItem(IDC_THEATER));
theater.AddString(THEATER0);
theater.AddString(THEATER1);
#ifdef RA2_MODE
@ -265,8 +264,7 @@ void CNewMap::OnEditchangeImportfile()
cmap.InsertFile(m_MapToImport,"Map");
if(cmap.sections.find("Map")==cmap.sections.end())
{
if (!cmap.TryGetSection("Map")) {
m_OK.EnableWindow(FALSE);
return;
}

View file

@ -84,9 +84,8 @@ BOOL CNewMapSpDlg::OnInitDialog()
CComboBox& house=*((CComboBox*)(GetDlgItem(IDC_HOUSE)));
int i;
for(i=0;i<rules.sections[HOUSES].values.size();i++)
{
house.AddString(TranslateHouse(*rules.sections[HOUSES].GetValue(i), TRUE));
for (auto const& [seq, id] : rules[HOUSES]) {
house.AddString(TranslateHouse(id, TRUE));
}
m_PrepareHouses=TRUE;