Hi,
I'm trying to insert a new TreeItem at a specific index by modifying the TreeStore. The problem is that the new item is added as a last child instead of the specified position.

The TreeStore has the setMonitorChanges set to true, and when inserting the new item I create a ChangeEvent and call notify:
Code:
ChangeEvent evt = new ChangeEvent(Add, this);
evt.setParent(this);
evt.setItem(child);
evt.setIndex(index);
notify(evt);
Now, in the TreeStore the onModelChange will execute, and the ChangeEventSource.Add will be chosen. The add method will insert the new child using as index the number of children under the given parent instead of the index from ChangeEvent:
Code:
insert(parent, item, getChildCount(parent), addChildren);
(TreeStore, line 186).

My question is what is the solution to insert a new treeItem at a specific position? Should the TreeStore be modified so that it takes into consideration the index set in the ChangeEvent?

Regards,
Ionut