MCPcopy Create free account
hub / github.com/SpartanJ/eepp / invalidate

Method invalidate

src/eepp/ui/models/sortingproxymodel.cpp:21–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19}
20
21void SortingProxyModel::invalidate( unsigned int flags ) {
22 if ( flags == UpdateFlag::DontInvalidateIndexes ) {
23 sort( mKeyColumn, mSortOrder );
24 } else {
25 mMappings.clear();
26
27 // FIXME: This is really harsh, but without precise invalidation, not much we can do.
28 forEachView( []( UIAbstractView* view ) { view->getSelection().clear( false ); } );
29 forEachView( []( UIAbstractView* view ) { view->notifySelectionChange(); } );
30 }
31 onModelUpdate( flags );
32}
33
34void SortingProxyModel::onModelUpdated( unsigned flags ) {
35 invalidate( flags );

Callers

nothing calls this directly

Calls 4

sortFunction · 0.85
notifySelectionChangeMethod · 0.80
clearMethod · 0.45
getSelectionMethod · 0.45

Tested by

no test coverage detected