summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2016-12-18 13:30:36 +0300
committerGeorge Hazan <ghazan@miranda.im>2016-12-18 13:30:36 +0300
commitfe1d2e6fd5d77885e3efe0339e03b2fec7002b0b (patch)
tree0bd580f0e9d113288dab05628f42455e16922990 /src
parent9705b55d9b81bc6bcc475c4b2f7db9e33f89e037 (diff)
fix for strange post-effects of dnd in CCtrlTreeView
Diffstat (limited to 'src')
-rw-r--r--src/mir_app/src/srmm_toolbar.cpp4
-rw-r--r--src/mir_core/src/ui_utils.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/mir_app/src/srmm_toolbar.cpp b/src/mir_app/src/srmm_toolbar.cpp
index aeff306fdf..9fcdfaecfc 100644
--- a/src/mir_app/src/srmm_toolbar.cpp
+++ b/src/mir_app/src/srmm_toolbar.cpp
@@ -579,7 +579,7 @@ public:
m_toolBar.SetFlags(MTREE_DND); // enable drag-n-drop
m_toolBar.OnSelChanged = Callback(this, &CSrmmToolbarOptions::OnTreeSelChanged);
m_toolBar.OnSelChanging = Callback(this, &CSrmmToolbarOptions::OnTreeSelChanging);
- m_toolBar.OnChange = Callback(this, &CSrmmToolbarOptions::OnTreeChanged);
+ m_toolBar.OnItemChanged = Callback(this, &CSrmmToolbarOptions::OnTreeItemChanged);
m_btnReset.OnClick = Callback(this, &CSrmmToolbarOptions::btnResetClicked);
m_btnSeparator.OnClick = Callback(this, &CSrmmToolbarOptions::btnSeparatorClicked);
@@ -734,7 +734,7 @@ public:
m_btnHidden.Enable(); m_btnHidden.SetState(cbd->m_bCanBeHidden);
}
- void OnTreeChanged(void*)
+ void OnTreeItemChanged(void*)
{
int iNewState = !m_toolBar.GetCheckState(m_toolBar.GetSelection());
m_btnIM.Enable(iNewState);
diff --git a/src/mir_core/src/ui_utils.cpp b/src/mir_core/src/ui_utils.cpp
index 1ca3ee069a..1e4cec81b9 100644
--- a/src/mir_core/src/ui_utils.cpp
+++ b/src/mir_core/src/ui_utils.cpp
@@ -1754,7 +1754,7 @@ BOOL CCtrlTreeView::OnNotify(int, NMHDR *pnmh)
if (evt.nmtvkey->wVKey == VK_SPACE) {
if (m_bCheckBox)
InvertCheck(GetSelection());
- OnChange(this);
+ OnItemChanged(&evt);
NotifyChange();
}
@@ -1773,7 +1773,7 @@ BOOL CCtrlTreeView::OnNotify(int, NMHDR *pnmh)
InvertCheck(hti.hItem);
else
SelectItem(hti.hItem);
- OnChange(this);
+ OnItemChanged(&evt);
NotifyChange();
}
}