Hello Jules,
I have a problem with TreeView.
When I select/deselect an item with Ctrl+Click, the item is deselected in the mouseUp method but itemClicked() is only called in mouseDown(). It is a problem for me because I do something in itemClicked() which is in relation with the selected items.
So I have a question: Why don’t you call the itemClicked() method in mouseUp() in (as you have done in the TableListBox class). Is it volontary done or did you forget it?
I’ve tried to add the linesfrom mouseDown in mouseUp :
void mouseUp (const MouseEvent& e)
{
Rectangle pos;
TreeViewItem* const item = findItemAt (e.y, pos);
if (item != 0 && e.mouseWasClicked())
{
if (needSelectionOnMouseUp)
{
selectBasedOnModifiers (item, e.mods);
MouseEvent e2 (e);
e2.x -= pos.getX();
e2.y -= pos.getY();
item->itemClicked (e2);
}
.....
and it seems to work for me.
Kevin
