Bug in TreeViewContentComponent::updateComponents() ?


I maybe found a bug in TreeView, when using items with custom components, with option rootItemVisible = false.
In my application, the bottom-most item was clipped too early. The following lines in TreeViewContentComponent::updateComponents() fixed the problem:

        TreeViewItem* item = owner->rootItem;
+        if (item && !owner->rootItemVisible)
+         yAdjust = item->itemHeight;
        int y = -yAdjust;

By the way, the variable yAdjust was always equal to 0 and thus useless.



Thanks - I think that seems like the right fix, though am a bit puzzled about why those xAdjust and yAdjust variables are there without being used… The treeview code is certainly one of the hairier bits of the library!