- // for a "file" node, activate it
- wxTreeEvent nevent( wxEVT_COMMAND_TREE_ITEM_ACTIVATED,
- GetId() );
- nevent.m_item = (long) item;
- nevent.m_code = 0;
- CalcScrolledPosition(x, y,
- &nevent.m_pointDrag.x,
- &nevent.m_pointDrag.y);
- nevent.SetEventObject( this );
- GetEventHandler()->ProcessEvent( nevent );
+ // if the user code didn't process the activate event,
+ // handle it ourselves by toggling the item when it is
+ // double clicked
+ if ( item->HasPlus() )
+ {
+ Toggle(item);
+ }