diff options
author | George Hazan <ghazan@miranda.im> | 2016-12-18 13:30:36 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2016-12-18 13:30:36 +0300 |
commit | fe1d2e6fd5d77885e3efe0339e03b2fec7002b0b (patch) | |
tree | 0bd580f0e9d113288dab05628f42455e16922990 | |
parent | 9705b55d9b81bc6bcc475c4b2f7db9e33f89e037 (diff) |
fix for strange post-effects of dnd in CCtrlTreeView
-rw-r--r-- | include/m_gui.h | 1 | ||||
-rw-r--r-- | src/mir_app/src/srmm_toolbar.cpp | 4 | ||||
-rw-r--r-- | src/mir_core/src/ui_utils.cpp | 4 |
3 files changed, 5 insertions, 4 deletions
diff --git a/include/m_gui.h b/include/m_gui.h index f38764d05c..b9f0fdc84e 100644 --- a/include/m_gui.h +++ b/include/m_gui.h @@ -1154,6 +1154,7 @@ public: CCallback<TEventInfo> OnEndLabelEdit;
CCallback<TEventInfo> OnGetDispInfo;
CCallback<TEventInfo> OnGetInfoTip;
+ CCallback<TEventInfo> OnItemChanged;
CCallback<TEventInfo> OnItemExpanded;
CCallback<TEventInfo> OnItemExpanding;
CCallback<TEventInfo> OnKeyDown;
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();
}
}
|