diff options
author | George Hazan <ghazan@miranda.im> | 2018-06-01 18:06:54 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-06-01 18:06:54 +0300 |
commit | d72cff07855ab1a9902386b5513173c8eca49f4b (patch) | |
tree | 232aab0743071c176947060830ce199492c1d1e7 /src/mir_core | |
parent | 5687e029d151d4590693c66da8440acb0fca1910 (diff) |
fix for malfunctioning CDlgBase::OnChange
Diffstat (limited to 'src/mir_core')
-rw-r--r-- | src/mir_core/src/CCtrlBase.cpp | 3 | ||||
-rw-r--r-- | src/mir_core/src/CDlgBase.cpp | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/mir_core/src/CCtrlBase.cpp b/src/mir_core/src/CCtrlBase.cpp index e0532b68a7..83d7243ab6 100644 --- a/src/mir_core/src/CCtrlBase.cpp +++ b/src/mir_core/src/CCtrlBase.cpp @@ -96,8 +96,7 @@ void CCtrlBase::NotifyChange() m_bChanged = true; if (m_parentWnd && !m_bSilent) - if (m_parentWnd->IsInitialized()) - ::SendMessage(::GetParent(m_parentWnd->GetHwnd()), PSM_CHANGED, 0, 0); + m_parentWnd->NotifyChange(); OnChange(this); } diff --git a/src/mir_core/src/CDlgBase.cpp b/src/mir_core/src/CDlgBase.cpp index bc8b7af72f..a92012e996 100644 --- a/src/mir_core/src/CDlgBase.cpp +++ b/src/mir_core/src/CDlgBase.cpp @@ -90,6 +90,11 @@ void CDlgBase::EndModal(INT_PTR nResult) void CDlgBase::NotifyChange(void) { + if (!m_initialized) + return; + + OnChange(); + if (m_hwndParent) SendMessage(m_hwndParent, PSM_CHANGED, (WPARAM)m_hwnd, 0); } |