void ThroughputModePanel::OnRemoveResult(wxCommandEvent& event) { ResultLog *rl = ResultLog::GetInstance(); Result *r = rl->GetResults( wxString( wxT("throughput") ) ); long id = m_ListResult->GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED); while( id != -1 ) { wxListItem item; item.m_mask = wxLIST_MASK_DATA; item.SetId( id ); m_ListResult->GetItem( item ); int index = (int)item.GetData(); r->DeleteRow( index ); id = m_ListResult->GetNextItem(id, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED); } RefreshResultList(); }