[Lazarus] TreeView sometimes calls Refresh instead of Invalidate

Juha Manninen juha.manninen62 at gmail.com
Fri Mar 30 00:19:01 CEST 2012

On Fri, Mar 30, 2012 at 12:25 AM, cobines <cobines at gmail.com> wrote:

> In the TreeView there are many calls to TreeView.Invalidate but
> TTreeNodes.SetUpdateState and TTreeStrings.SetUpdateState call
> TreeView.Refresh instead. Refresh calls TWidgetSet.UpdateWindow which
> on Win32 and GTK2 causes repaint of the control via synchronous
> WM_PAINT. QT4 seems to only post a paint request to the message queue.
> Should it not be Invalidate instead of Refresh? Why the need for
> immediate Repaint? Multiple calls to Invalidate stack, so only one
> Paint is done later.
> At least on Windows and GTK2 this causes the TreeView to be repainted
> twice instead of once:

Could you please create a patch. I will test and apply it.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20120330/76868fa8/attachment-0003.html>

More information about the Lazarus mailing list