Fix: trigger deletion causing mismatched event & action deleted (#114)

* used copied 'triggerId' instead of reference, because it will be deleted and becomes invalid .
This commit is contained in:
Zero Fanker 2024-11-06 23:54:00 -05:00 committed by GitHub
parent 11c93c3b3b
commit f7e3d96881
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 15 additions and 1635 deletions

View file

@ -659,9 +659,6 @@ void CFinalSunDlg::UpdateDialogs(BOOL bOnlyMissionControl, BOOL bNoRepos)
if (m_Scripttypes.m_hWnd) {
m_Scripttypes.UpdateDialog();
}
if (m_triggers.m_hWnd) {
m_triggers.UpdateDialog();
}
if (m_triggereditor.m_hWnd) {
m_triggereditor.UpdateDialog();
}
@ -2284,8 +2281,6 @@ void CFinalSunDlg::HideAllDialogs()
m_taskforces.ShowWindow(SW_HIDE);
if (m_teamtypes)
m_teamtypes.ShowWindow(SW_HIDE);
if (m_triggers)
m_triggers.ShowWindow(SW_HIDE);
}
void CFinalSunDlg::OnFileValidatemap()
@ -2542,18 +2537,6 @@ void CFinalSunDlg::OnEditTeams()
void CFinalSunDlg::OnEditTriggers()
{
if (m_triggers.m_hWnd == NULL) {
if (!m_triggers.Create(CTriggers::IDD, NULL)) {
MessageBox(GetLanguageStringACP("Err_CreateErr"), "Error");
}
}
if (m_triggers.m_hWnd != NULL) {
//m_triggers.UpdateStrings();
m_triggers.UpdateDialog();
m_triggers.ShowWindow(SW_SHOW);
Sound(SOUND_POSITIVE);
}
}
void CFinalSunDlg::OnSetFocus(CWnd* pOldWnd)