On Thu, Jan 8, 2009 at 11:52 AM, Ville M. Vainio <[email protected]> wrote:
> > On Thu, Jan 8, 2009 at 4:19 PM, Edward K. Ream <[email protected]> > wrote: > > > 4. Expanding a tree item will probably *not* count as changing the > > tree. That is, I hope that the revised code can create tree items as > > necessary when they are first revealed, without actually redrawing the > > entire tree. > > > > This could be tricky. Drawing the newly-revealed nodes is the easy > > part. The hard part is to determine when an tree node must be expanded > > as the result of a cursor movement. This problem didn't exist with > > the "non-clever" code: Leo's core simply calls c.redraw. > > Why not just hook into itemExpanded signal? The qt plugins *does* hook into the itemExpanded signal. The problem is triggering the signal, that is, having Leo's core indirectly call LeoQtTree.expandItem. There are many ways for Leo's core to request that nodes expand or collapse. Some of those ways are subtle. For example, the find command can reveal arbitrarily many nodes. I'll probably compromise and distinguish between easy node expansions that can be optimized and hard expansions that can't. Details fuzzy at present. But doing a "full" redraw (of only visible nodes) is a perfectly good default for infrequent operations such as hoists, finds and other complex "reveals". For these reasons, I shall create a new clever-redraw2 branch. I need to make a fresh start that minimizes the changes to Leo's core. I can then proceed as before by carefully making, in a step-by-step fashion, the minimum needed changes in Leo's core, testing the results as I go. Edward --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~----------~----~----~----~------~----~------~--~---
