pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Brown <gk_br...@verizon.net>
Subject Re: TreeNodeEditor issue
Date Thu, 14 Apr 2011 12:35:09 GMT
> Greg, why are we calling update(int,TreeNode) from TreeViewNodeEditor?
> It seems to me that we don't need to do anything at all in this case, since the list
has not changed.
> Does something rely on getting an update event from the model list when a node changes?

Calling update() is what triggers the change notification from the branch. The editors for
ListView and TableView and are implemented similarly. The difference is that list and table
data elements don't have parents, so it is sufficient to simply call update() on the data.
This fails for tree branches because a tree node with a non-null parent is already part of
a tree and can't be added to another one. The fix is to remove and then re-insert the node
at the same index when the branch is not sorted.

Thanks to Lello and Noel for catching this and helping to track it down.

G


Mime
View raw message