mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 15:11:37 +00:00
Implemented copyWithZone
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@8330 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
ac3979e8f4
commit
24b3d9ce47
1 changed files with 18 additions and 0 deletions
|
@ -208,6 +208,7 @@ static NSColor *shadowCol;
|
|||
else
|
||||
{
|
||||
ASSIGN (_contents, @"Minimum");
|
||||
_cell.contents_is_attributed_string = NO;
|
||||
textSize = [super cellSize];
|
||||
RELEASE (_contents);
|
||||
_contents = nil;
|
||||
|
@ -289,6 +290,23 @@ static NSColor *shadowCol;
|
|||
[self drawInteriorWithFrame: cellFrame inView: controlView];
|
||||
}
|
||||
|
||||
/*
|
||||
* Copying
|
||||
*/
|
||||
- (id) copyWithZone: (NSZone*)zone
|
||||
{
|
||||
NSFormCell *c = (NSFormCell *)[super copyWithZone:zone];
|
||||
|
||||
/* We need to copy the title cell (as opposed to simply copying the
|
||||
pointer to it), otherwise if eg we change the string value of the
|
||||
title cell of the copied cell, the string value of the title cell
|
||||
of the original cell would be changed too ! */
|
||||
c->_titleCell = [_titleCell copyWithZone: zone];
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
|
||||
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||
{
|
||||
BOOL tmp;
|
||||
|
|
Loading…
Reference in a new issue