summaryrefslogtreecommitdiff
path: root/plugins/Clist_modern/src/modern_clc.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-07-04 21:17:37 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-07-04 21:17:37 +0000
commite693f1d803f736478a30dd76c6748839796fca77 (patch)
treea98fa46db871e9edbf2f9ef4de566228daee299c /plugins/Clist_modern/src/modern_clc.cpp
parentf1bbd65bbaa4291c194244424668aa16c357ca0f (diff)
standardizing the control over checkboxes in clist
git-svn-id: http://svn.miranda-ng.org/main/trunk@9682 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern/src/modern_clc.cpp')
-rw-r--r--plugins/Clist_modern/src/modern_clc.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp
index 55ff08eb3c..27d53a83cf 100644
--- a/plugins/Clist_modern/src/modern_clc.cpp
+++ b/plugins/Clist_modern/src/modern_clc.cpp
@@ -903,12 +903,12 @@ static LRESULT clcOnLButtonDown(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam
}
if (hit != -1 && !(hitFlags & CLCHT_NOWHERE) && (hitFlags & CLCHT_ONITEMCHECK)) {
- contact->flags ^= CONTACTF_CHECKED;
- for (int i = 0; i < contact->SubAllocated; i++)
- contact->subcontacts[i].flags ^= CONTACTF_CHECKED;
+ int bNewState = (contact->flags & CONTACTF_CHECKED) == 0; // inversion
if (contact->type == CLCIT_GROUP)
- pcli->pfnSetGroupChildCheckboxes(contact->group, contact->flags&CONTACTF_CHECKED);
+ pcli->pfnSetGroupChildCheckboxes(contact->group, bNewState);
+ else
+ pcli->pfnSetContactCheckboxes(contact, bNewState);
pcli->pfnRecalculateGroupCheckboxes(hwnd, dat);
CLUI__cliInvalidateRect(hwnd, NULL, FALSE);