MCPcopy Create free account
hub / github.com/amule-project/amule / UpdateItem

Method UpdateItem

src/SharedFilesCtrl.cpp:448–467  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

446
447
448void 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
470void CSharedFilesCtrl::BeginBulkUpdate()

Callers

nothing calls this directly

Calls 1

SelectionUpdatedMethod · 0.80

Tested by

no test coverage detected