mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-15 11:13:50 +00:00
Refs #1700. Fixed: setItemPrototype crash.
Setting the item prototype without first adding the collection view to a view would cause a crash, as would reloadContent. This fix makes sure the collection view doesn't try to tile itself unless it has a frame.
This commit is contained in:
1 parent
1248b1fb29
commit
21efb90b4c
1 file changed
+4
@@ -492,6 +492,10 @@ var HORIZONTAL_MARGIN = 2;
|
||||
oldItemSize = _itemSize,
|
||||
storedFrameSize = _storedFrameSize;
|
||||
|
||||
// No need to tile if we are not yet placed in the view hierarchy.
|
||||
if (!frameSize)
|
||||
return;
|
||||
|
||||
[self _updateMinMaxItemSizeIfNeeded];
|
||||
|
||||
[self _computeGridWithSize:frameSize count:AT_REF(count)];
|
||||
|
||||
Reference in new issue
Block a user