summaryrefslogtreecommitdiff
path: root/src/mir_core
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-01-16 16:39:56 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-01-16 16:40:02 +0300
commit97f80dd9e5737bb65cdd2b745c864e9c3b7ab433 (patch)
treea9c4d64b44c94cbc5dc9de1280c0e47a51ae496c /src/mir_core
parente2401b83c1cecd4460ccd6cb44c5f9284eb5e0ac (diff)
glory, glory, halleluya: perversive manual call of OnChange() event inside OnInitDialog isn't needed anymore
Diffstat (limited to 'src/mir_core')
-rw-r--r--src/mir_core/src/CCtrlBase.cpp10
-rw-r--r--src/mir_core/src/CCtrlCheck.cpp1
2 files changed, 7 insertions, 4 deletions
diff --git a/src/mir_core/src/CCtrlBase.cpp b/src/mir_core/src/CCtrlBase.cpp
index 3c1c08db87..50d3366454 100644
--- a/src/mir_core/src/CCtrlBase.cpp
+++ b/src/mir_core/src/CCtrlBase.cpp
@@ -89,12 +89,14 @@ bool CCtrlBase::Enabled() const
void CCtrlBase::NotifyChange()
{
- if (!m_parentWnd || !m_parentWnd->IsInitialized())
+ if (!m_parentWnd)
return;
- m_bChanged = true;
- if (!m_bSilent)
- m_parentWnd->NotifyChange();
+ if (m_parentWnd->IsInitialized()) {
+ m_bChanged = true;
+ if (!m_bSilent)
+ m_parentWnd->NotifyChange();
+ }
OnChange(this);
}
diff --git a/src/mir_core/src/CCtrlCheck.cpp b/src/mir_core/src/CCtrlCheck.cpp
index 9c50db8849..6c94fa20cc 100644
--- a/src/mir_core/src/CCtrlCheck.cpp
+++ b/src/mir_core/src/CCtrlCheck.cpp
@@ -58,6 +58,7 @@ int CCtrlCheck::GetState()
void CCtrlCheck::SetState(int state)
{
::SendMessage(m_hwnd, BM_SETCHECK, state, 0);
+ OnChange(this);
}
bool CCtrlCheck::IsChecked()