+ listbox->m_oldSelection = selections;
+ listbox->HandleWindowEvent( event );
+ return;
+ }
+
+ // Now test if any new item is deselected
+ bool any_new_deselected = false;
+ for (idx = 0; idx < listbox->m_oldSelection.GetCount(); idx++)
+ {
+ int item = listbox->m_oldSelection[idx];
+ if (selections.Index(item) == wxNOT_FOUND)
+ {
+ event.SetInt( item );
+ event.SetString( listbox->GetString( item ) );
+ any_new_deselected = true;
+ break;
+ }
+ }
+
+ if (any_new_deselected)
+ {
+ // indicate that this is a selection
+ event.SetExtraLong( 0 );
+
+ listbox->m_oldSelection = selections;