summaryrefslogtreecommitdiff
path: root/lisp/tree-widget.el
diff options
context:
space:
mode:
authorDavid Ponce <david@dponce.com>2005-09-19 09:52:32 +0000
committerDavid Ponce <david@dponce.com>2005-09-19 09:52:32 +0000
commit4ff094a82632223f032d3e9f17cf4b4d82706ae8 (patch)
treec9f2aef2ba8d620fe7f1afb3907ba8e8d447a098 /lisp/tree-widget.el
parent900d169800451cbe59c151fc5d7043c6d98e449f (diff)
downloademacs-4ff094a82632223f032d3e9f17cf4b4d82706ae8.tar.gz
(tree-widget-value-create): Save the converted tree :node widget.
Diffstat (limited to 'lisp/tree-widget.el')
-rw-r--r--lisp/tree-widget.el18
1 files changed, 10 insertions, 8 deletions
diff --git a/lisp/tree-widget.el b/lisp/tree-widget.el
index 049999a7b88..28207436688 100644
--- a/lisp/tree-widget.el
+++ b/lisp/tree-widget.el
@@ -647,14 +647,15 @@ This hook should be local in the buffer setup to display widgets.")
(when (and (not args) xpandr)
(setq args (mapcar 'widget-convert (funcall xpandr tree)))
(widget-put tree :args args))
+ ;; Defer the node widget creation after icon creation.
+ (widget-put tree :node (widget-convert node))
;; Create the icon widget for the expanded tree.
(push (widget-create-child-and-convert
- tree (widget-get tree (if args :open-icon :empty-icon))
- ;; At this point the node widget isn't yet created.
- :node (setq node (widget-convert node)))
+ tree (widget-get tree (if args :open-icon :empty-icon)))
buttons)
;; Create the tree node widget.
- (push (widget-create-child tree node) children)
+ (push (widget-create-child tree (widget-get tree :node))
+ children)
;; Update the icon :node with the created node widget.
(widget-put (car buttons) :node (car children))
;; Create the tree children.
@@ -696,14 +697,15 @@ This hook should be local in the buffer setup to display widgets.")
;; Update the icon :node with the created node widget.
(widget-put (car buttons) :node (car children)))))
;;;; Collapsed node.
+ ;; Defer the node widget creation after icon creation.
+ (widget-put tree :node (widget-convert node))
;; Create the icon widget for the collapsed tree.
(push (widget-create-child-and-convert
- tree (widget-get tree :close-icon)
- ;; At this point the node widget isn't yet created.
- :node (setq node (widget-convert node)))
+ tree (widget-get tree :close-icon))
buttons)
;; Create the tree node widget.
- (push (widget-create-child tree node) children)
+ (push (widget-create-child tree (widget-get tree :node))
+ children)
;; Update the icon :node with the created node widget.
(widget-put (car buttons) :node (car children)))
;; Save widget children and buttons. The tree-widget :node child