| 446 | |
| 447 | |
| 448 | void CSharedFilesCtrl::UpdateItem(CKnownFile* toupdate) |
| 449 | { |
| 450 | if (m_inBulkUpdate) { |
| 451 | // Caller (e.g. CSharedFileList::ClearED2KPublishInfo) will |
| 452 | // issue a single Refresh() in EndBulkUpdate(). Skipping the |
| 453 | // per-row FindItem here is what turns ClearED2KPublishInfo |
| 454 | // from O(N²) into O(N) for users with thousands of shared |
| 455 | // files. See #302. |
| 456 | return; |
| 457 | } |
| 458 | long result = FindItem( -1, reinterpret_cast<wxUIntPtr>(toupdate) ); |
| 459 | |
| 460 | if ( result > -1 ) { |
| 461 | RefreshItem(result); |
| 462 | |
| 463 | if ( GetItemState( result, wxLIST_STATE_SELECTED ) ) { |
| 464 | theApp->amuledlg->m_sharedfileswnd->SelectionUpdated(); |
| 465 | } |
| 466 | } |
| 467 | } |
| 468 | |
| 469 | |
| 470 | void CSharedFilesCtrl::BeginBulkUpdate() |
nothing calls this directly
no test coverage detected