mirror of
https://github.com/electronicarts/CNC_TS_and_RA2_Mission_Editor.git
synced 2025-04-30 09:01:41 -04:00
Fix: Trigger Name not updated when switching tab .
This commit is contained in:
parent
b28868ba34
commit
aeb807ca16
2 changed files with 20 additions and 1 deletions
|
@ -65,6 +65,7 @@ void CTriggerOptionsDlg::DoDataExchange(CDataExchange* pDX)
|
|||
|
||||
BEGIN_MESSAGE_MAP(CTriggerOptionsDlg, CDialog)
|
||||
//{{AFX_MSG_MAP(CTriggerOptionsDlg)
|
||||
ON_WM_SHOWWINDOW()
|
||||
ON_CBN_EDITCHANGE(IDC_HOUSE, OnEditchangeHouse)
|
||||
ON_CBN_EDITCHANGE(IDC_ATTACHEDTRIGGER, OnEditchangeAttachedtrigger)
|
||||
ON_EN_KILLFOCUS(IDC_NAME, OnChangeName)
|
||||
|
@ -237,10 +238,26 @@ void CTriggerOptionsDlg::OnKillfocusName()
|
|||
void CTriggerOptionsDlg::OnKillFocus(CWnd* pNewWnd)
|
||||
{
|
||||
CDialog::OnKillFocus(pNewWnd);
|
||||
|
||||
((CTriggerEditorDlg*)(this->GetOwner()->GetOwner()))->UpdateDialog();
|
||||
}
|
||||
|
||||
void CTriggerOptionsDlg::OnShowWindow(BOOL bShow, UINT nStatus)
|
||||
{
|
||||
if (!bShow) {
|
||||
if (auto pOldFocus = GetFocus()) {
|
||||
switch (pOldFocus->GetDlgCtrlID())
|
||||
{
|
||||
case IDC_NAME: {
|
||||
this->OnChangeName();
|
||||
} break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
CDialog::OnShowWindow(bShow, nStatus);
|
||||
}
|
||||
|
||||
void CTriggerOptionsDlg::OnEditchangeTriggertype()
|
||||
{
|
||||
CIniFile& ini = Map->GetIniFile();
|
||||
|
|
|
@ -66,6 +66,8 @@ protected:
|
|||
CToolTipCtrl m_tooltip;
|
||||
virtual BOOL OnInitDialog();
|
||||
|
||||
void OnShowWindow(BOOL bShow, UINT nStatus);
|
||||
|
||||
// Generierte Nachrichtenzuordnungsfunktionen
|
||||
//{{AFX_MSG(CTriggerOptionsDlg)
|
||||
afx_msg void OnChangeName();
|
||||
|
|
Loading…
Add table
Reference in a new issue