mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 15:10:38 +00:00
Make the button redraw after setting the image.
Don't do anything when the same contents view gets set on the window again. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27308 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a50a598d7b
commit
c1964b83f3
3 changed files with 11 additions and 7 deletions
|
@ -433,18 +433,12 @@ typedef struct _GSButtonCellFlags
|
|||
|
||||
- (void) setImage: (NSImage *)anImage
|
||||
{
|
||||
if (anImage)
|
||||
{
|
||||
NSAssert ([anImage isKindOfClass: [NSImage class]],
|
||||
NSInvalidArgumentException);
|
||||
}
|
||||
|
||||
if (_cell.image_position == NSNoImage)
|
||||
{
|
||||
[self setImagePosition: NSImageOnly];
|
||||
}
|
||||
|
||||
ASSIGN (_cell_image, anImage);
|
||||
[super setImage: anImage];
|
||||
}
|
||||
|
||||
/**<p>Sets the NSButtonCell's alternate image to <var>anImage</var>.</p>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue