mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-17 04:00:42 +00:00
FIXED: only set a content view of CPBox if it is not a separator
This commit is contained in:
1 parent
bf8070c42d
commit
00bdbcf857
1 file changed
+5
-2
+5
-2
@@ -616,8 +616,11 @@ var CPBoxTypeKey = @"CPBoxTypeKey",
|
||||
_titlePosition = [aCoder decodeIntForKey:CPBoxTitlePosition];
|
||||
_titleView = [aCoder decodeObjectForKey:CPBoxTitleView] || [CPTextField labelWithTitle:_title];
|
||||
|
||||
_contentView = [aCoder decodeObjectForKey:CPBoxContentView] || [[CPView alloc] initWithFrame:[self bounds]];
|
||||
[self replaceSubview:_contentView with:[self subviews][0]];
|
||||
if (_boxType != CPBoxSeparator)
|
||||
{
|
||||
_contentView = [aCoder decodeObjectForKey:CPBoxContentView] || [[CPView alloc] initWithFrame:[self bounds]];
|
||||
[self replaceSubview:_contentView with:[self subviews][0]];
|
||||
}
|
||||
|
||||
[self setAutoresizesSubviews:YES];
|
||||
[_contentView setAutoresizingMask:CPViewWidthSizable | CPViewHeightSizable];
|
||||
|
||||
Reference in new issue
Block a user