Initialize listview item size.

Duane Clark dclark at akamail.com
Wed Feb 5 10:35:10 CST 2003


Dimitrie O. Paun wrote:
> On February 3, 2003 11:58 am, Duane Clark wrote:
> 
>>This is a separate bug from the other listview patches. If an app sends
>>a LISTVIEW_Paint to a new listview before adding any items (which an app
>>was :-) the item size was not getting set, causing subsequent
>>LISTVIEW_Paint calls to clip the painting.
>>
>>Changelog:
>>        Make sure item size is initialized when the first item is added.
> 
> 
> This is an optimization I've put in to avoid a lot of complex calculations
> while the listview is initially populated (typically before it's being
> painted). You are right, we have to detect the change nItemCount from 0
> to 1, to do all those calculations. But since we don't actually need them
> until we paint, I'd like to defer them as much as possible. Moreover,
> with your patch, we don't catch the SetItemCount case. What about this
> patch instead:

Last night almost the same solution occured to me, so yes I would agree 
this is better.





More information about the wine-devel mailing list