diff options
author | Bibiko <bibiko@eva.mpg.de> | 2009-06-24 10:26:35 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2009-06-24 10:26:35 +0000 |
commit | 37f9a67ef142e498d12e181b029d97a18213b8f0 (patch) | |
tree | c6c0d5633d68ca087814faebb34ee05f554b65db /Source/CMImageView.m | |
parent | 6f0f5ec932e7a1697ee344be9526829ec8f90007 (diff) | |
download | sequelpro-37f9a67ef142e498d12e181b029d97a18213b8f0.tar.gz sequelpro-37f9a67ef142e498d12e181b029d97a18213b8f0.tar.bz2 sequelpro-37f9a67ef142e498d12e181b029d97a18213b8f0.zip |
• changes in editSheet:
- generate Hex representation on demand (this speeds up the working with images enormously)
- added support to paste image data via the pasteboard (data are stored as TIFF LZW compressed)
- if user switched to an other view (text/iamge/hex) that view will be become first responder explicity (fixes an issue that the Open button got the focus sometimes)
Diffstat (limited to 'Source/CMImageView.m')
-rw-r--r-- | Source/CMImageView.m | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Source/CMImageView.m b/Source/CMImageView.m index 44e9e186..505921f7 100644 --- a/Source/CMImageView.m +++ b/Source/CMImageView.m @@ -104,4 +104,25 @@ return NO; } +- (void)paste:(id)sender +{ + + // [super paste:sender]; + id delegateForUse = nil; + + // If the delegate or the delegate's content instance doesn't implement processUpdatedImageData:, + // return the super's implementation + if (delegate) { + if ([delegate respondsToSelector:@selector(processUpdatedImageData:)]) { + delegateForUse = delegate; + } else if ( [delegate valueForKey:@"tableContentInstance"] + && [[delegate valueForKey:@"tableContentInstance"] respondsToSelector:@selector(processUpdatedImageData:)] ) { + delegateForUse = [delegate valueForKey:@"tableContentInstance"]; + } + } + if (delegateForUse) + [delegateForUse processPasteImageData]; + +} + @end
\ No newline at end of file |