| 19 | } |
| 20 | |
| 21 | void 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 | |
| 34 | void SortingProxyModel::onModelUpdated( unsigned flags ) { |
| 35 | invalidate( flags ); |
nothing calls this directly
no test coverage detected