The qt tree optimization project has begun with some baby steps: - created stubs for all new redraw_after methods.
- full_redraw is an alias for redraw_now that will be used in leoQtTree for clarity. - redraw_now now creates a tnodeDict. Keys are tnodes, values are (p,it), where it is a tree item. This supports a crucial update pattern: the items in tnodeDict.get(p.v.t) are all the tuples (p-prime,it) for which p-prime is p or joined (cloned) to p. For example, tree.updateIcon(p) now uses the tnodeDict to update all icons for all nodes joined to p, **without searching the tree**. - redraw_after_icons_changed just calls update_icon(p). Icons for cloned nodes are changed as expected. There is no support yet for the 'all' keyword arg, which will be set for commands like unmark-all. At present Leo's core doesn't set the 'all' arg. So this is a good start: we have short-circuited a commonly called redraw method, and in the process created a useful helper data structure and an important update pattern. 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 -~----------~----~----~----~------~----~------~--~---
