aronzillo / aephyr

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Patch for /trunk/src/aephyr/swing/TreeModelTransformer.java

GoogleCodeExporter opened this issue · comments

The treemodeltransformer is brilliant in many ways, but has quite a lot of 
issues. One of the issues is that when a node which has a Converter is removed, 
all the Converters for descendent nodes should be removed. The code asks the 
model for the child nodes of the removed nodes, but as these have been, ehum, 
removed, there is no such info to be found. To solve this issue I added another 
map which stores the path of each created Converter. When a converter is 
removed, this map is iterated through and converters with descendent paths are 
removed. 

There is a heap of other issues that I have struggled to fix. One issue that I 
have not tested (yes, I have written test cases =) are when several nodes are 
added or removed with one event.

If I find more issues and manage to repair them, I will post these changes.

Never the less, thanks for the great code, mr Aephyr!

Original issue reported on code.google.com by erik.b.j...@gmail.com on 10 Mar 2011 at 2:54

Attachments: