mirror of
https://github.com/electronicarts/CNC_TS_and_RA2_Mission_Editor.git
synced 2025-05-05 19:21:43 -04:00
fixed #83, 'InsertString' issue on local variable feature .
This commit is contained in:
parent
22fa8291be
commit
50f57e1675
1 changed files with 10 additions and 6 deletions
|
@ -107,7 +107,7 @@ void CGlobalsDlg::UpdateDialog()
|
|||
added += " No name";
|
||||
}
|
||||
|
||||
m_Global.InsertString(i, added);
|
||||
m_Global.SetItemData(m_Global.AddString(added), i);
|
||||
|
||||
if (bFailFind) {
|
||||
break;
|
||||
|
@ -123,17 +123,19 @@ void CGlobalsDlg::OnChangeDescription()
|
|||
CIniFile& ini = Map->GetIniFile();
|
||||
|
||||
int cursel = m_Global.GetCurSel();
|
||||
if (cursel < 0) return;
|
||||
if (cursel < 0) {
|
||||
return;
|
||||
}
|
||||
int curglob = m_Global.GetItemData(cursel);
|
||||
|
||||
|
||||
|
||||
char c[50];
|
||||
itoa(curglob, c, 10);
|
||||
|
||||
UpdateData(TRUE);
|
||||
|
||||
if (m_Description.Find(",") >= 0) m_Description.SetAt(m_Description.Find(","), 0);
|
||||
if (m_Description.Find(",") >= 0) {
|
||||
m_Description.SetAt(m_Description.Find(","), 0);
|
||||
}
|
||||
|
||||
if (ini.GetString("VariableNames", c).IsEmpty()) {
|
||||
ini.SetString("VariableNames", c, "text,0");
|
||||
|
@ -153,7 +155,9 @@ void CGlobalsDlg::OnSelchangeGlobal()
|
|||
CIniFile& ini = Map->GetIniFile();
|
||||
|
||||
int cursel = m_Global.GetCurSel();
|
||||
if (cursel < 0) return;
|
||||
if (cursel < 0) {
|
||||
return;
|
||||
}
|
||||
int curglob = m_Global.GetItemData(cursel);
|
||||
|
||||
char c[50];
|
||||
|
|
Loading…
Add table
Reference in a new issue