There is a qt5 bug in how the treewidget handles checkboxes in treemode. Nothing critical, does not affect coin control, but the checkboxes appear to be buggy to the user. See inline code comment.
Fixes point 3 of #3840.
With Qt 5.0.2 I don’t see a difference in behavior with or without this patch. I’ve tried clicking on a parent checkbox with lots of children, but they go to fully selected in either case.
So probably the problem was introduced later. I’ll test with Qt 5.2.x later on.
I havent tested 5.0, only 5.2. But the bug is the same on windows and linux, so its a qt thing.
The added if-statement should be safe, because I explicitly check for the child to be partially selected. This can never happen, unless bug. So if the bug is fixed, the if-statement does not trigger.