mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-25 04:57:03 +00:00
Fix an issue where _CPImageAndTextView, if it had an image, wouldn't show the image if it hadn't already been loaded. In other words, it now listens for image load events and redisplays.
This commit is contained in:
@@ -285,13 +285,28 @@ var HORIZONTAL_MARGIN = 3.0,
|
||||
{
|
||||
if (_image == anImage)
|
||||
return;
|
||||
|
||||
|
||||
if ([_image delegate] === self)
|
||||
[_image setDelegate:nil];
|
||||
|
||||
_image = anImage;
|
||||
_flags |= _CPImageAndTextViewImageChangedFlag;
|
||||
|
||||
|
||||
if ([_image loadStatus] !== CPImageLoadStatusCompleted)
|
||||
[_image setDelegate:self];
|
||||
|
||||
[self setNeedsLayout];
|
||||
}
|
||||
|
||||
- (void)imageDidLoad:(id)anImage
|
||||
{
|
||||
if (anImage === _image)
|
||||
{
|
||||
_flags |= _CPImageAndTextViewImageChangedFlag;
|
||||
[self setNeedsLayout];
|
||||
}
|
||||
}
|
||||
|
||||
- (CPImage)image
|
||||
{
|
||||
return _image;
|
||||
|
||||
Reference in New Issue
Block a user