Skip to content

Commit

Permalink
FIXED: only set a content view of CPBox if it is not a separator
Browse files Browse the repository at this point in the history
  • Loading branch information
primalmotion committed Jan 20, 2016
1 parent bf8070c commit 00bdbcf
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions AppKit/CPBox.j
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 00bdbcf

Please sign in to comment.