Re: gtk.TreeModel.iter_children() method, how often should it be called?



That's what I would hope but it's sure not what I'm seeing.  I put
print commands in my iter_next function and I see that it is returning
the same sequence of 43 entries hundreds of times in succession, then
it stops and the updated view is finally displayed.  If I knew how
TreeView decides it has got enough data to redraw I'd know where to
look for the problem.   As it is I'm thoroughly stumped, mainly
because I don't understand what TreeView is looking for to know it's
time to stop calling iter_next.

On Tue, Jun 23, 2009 at 4:56 PM, Kristian Rietveld<kris gtk org> wrote:
> On Tue, Jun 23, 2009 at 10:48 PM, Gerald
> Britton<gerald britton gmail com> wrote:
>> Not using TreeViewSort.  I certainly agree about excessive calls.  So
>> the question must then be, "why is TreeView redrawing the view over
>> and over again?"  Also, "What is TreeView looking for to make it stop
>> redrawing the view?"
>
> TreeView only redraws when it is necessary.  This is, for example,
> when the model changes: when a row is inserted or deleted, or when a
> row's contents have been changed (in such a case the row-changed
> signal is emitted).  Or when the the widget hierarchy implies a
> redraw, or any code calling gtk_widget_queue_redraw() or resize() on
> the tree view or any widget higher in the widget tree.
>
>
> regards,
>
> -kris.
>



-- 
Gerald Britton


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]