mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 07:00:46 +00:00
Update visibleItems when arranging items
This commit is contained in:
parent
04b0a15526
commit
9c0f4ed731
2 changed files with 4 additions and 1 deletions
|
@ -437,7 +437,7 @@ APPKIT_EXPORT_CLASS
|
|||
NSCollectionViewLayout *_collectionViewLayout;
|
||||
|
||||
// Managing items
|
||||
NSArray *_visibleItems;
|
||||
NSMutableArray *_visibleItems;
|
||||
NSSet *_indexPathsForVisibleItems;
|
||||
NSDictionary *_visibleSupplementaryViews;
|
||||
NSSet *_indexPathsForSupplementaryElementsOfKind;
|
||||
|
|
|
@ -1382,6 +1382,8 @@ static NSString *placeholderItem = nil;
|
|||
if (item != nil)
|
||||
{
|
||||
NSView *v = [item view];
|
||||
|
||||
[_visibleItems addObject: item];
|
||||
if (_collectionViewLayout)
|
||||
{
|
||||
NSCollectionViewLayoutAttributes *attrs =
|
||||
|
@ -1426,6 +1428,7 @@ static NSString *placeholderItem = nil;
|
|||
NSInteger ns = [self numberOfSections];
|
||||
NSInteger cs = 0;
|
||||
|
||||
[_visibleItems removeAllObjects];
|
||||
NSLog(@"reloading data... number of sections = %ld, %@", ns, _collectionViewLayout);
|
||||
[_collectionViewLayout prepareLayout];
|
||||
for (cs = 0; cs < ns; cs++)
|
||||
|
|
Loading…
Reference in a new issue