diff options
author | George Hazan <george.hazan@gmail.com> | 2014-04-02 18:51:57 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-04-02 18:51:57 +0000 |
commit | 1c14e99dd57b0ccea99d8efa4ce94ab5c6077276 (patch) | |
tree | f28eac37d25edf82ffce0c3492f7d5f3320ee214 /src | |
parent | 09d94267629233582f3d56fa4dbea69c95dfea3c (diff) |
minor patch for clicks in menu editor
git-svn-id: http://svn.miranda-ng.org/main/trunk@8827 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/clist/genmenuopt.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/clist/genmenuopt.cpp b/src/modules/clist/genmenuopt.cpp index 60286a8a4c..cc2fb20666 100644 --- a/src/modules/clist/genmenuopt.cpp +++ b/src/modules/clist/genmenuopt.cpp @@ -477,11 +477,11 @@ static int handleCustomDraw(HWND hWndTreeView, LPNMTVCUSTOMDRAW pNMTVCD) return 0;
}
-static void OnClickCheckbox(HWND hwndDlg, HWND hwndTree)
+static void OnClickCheckbox(HWND hwndDlg, HWND hwndTree, HTREEITEM hItem)
{
TVITEM tvi;
tvi.mask = TVIF_HANDLE | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_PARAM;
- tvi.hItem = TreeView_GetSelection(hwndTree);
+ tvi.hItem = hItem;
TreeView_GetItem(hwndTree, &tvi);
tvi.iImage = tvi.iSelectedImage = !tvi.iImage;
@@ -636,7 +636,7 @@ static INT_PTR CALLBACK GenMenuOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA case TVN_KEYDOWN:
if (((LPNMLVKEYDOWN)lParam)->wVKey == VK_SPACE)
- OnClickCheckbox(hwndDlg, hdr->hwndFrom);
+ OnClickCheckbox(hwndDlg, hdr->hwndFrom, TreeView_GetSelection(hdr->hwndFrom));
break;
case NM_CLICK:
@@ -647,7 +647,7 @@ static INT_PTR CALLBACK GenMenuOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA ScreenToClient(hdr->hwndFrom, &hti.pt);
if (TreeView_HitTest(hdr->hwndFrom, &hti)) {
if (hti.flags & TVHT_ONITEMICON)
- OnClickCheckbox(hwndDlg, hdr->hwndFrom);
+ OnClickCheckbox(hwndDlg, hdr->hwndFrom, hti.hItem);
/*--------MultiSelection----------*/
if (hti.flags & TVHT_ONITEMLABEL) {
|