Revision: 22663
http://sourceforge.net/p/bibdesk/svn/22663
Author: hofman
Date: 2018-09-24 20:24:45 +0000 (Mon, 24 Sep 2018)
Log Message:
-----------
use event subject for document context of select command
Modified Paths:
--------------
trunk/bibdesk/BDSKSelectCommand.m
Modified: trunk/bibdesk/BDSKSelectCommand.m
===================================================================
--- trunk/bibdesk/BDSKSelectCommand.m 2018-09-24 15:57:57 UTC (rev 22662)
+++ trunk/bibdesk/BDSKSelectCommand.m 2018-09-24 20:24:45 UTC (rev 22663)
@@ -42,6 +42,7 @@
#import "BibItem.h"
#import "BDSKGroup.h"
#import "NSArray_BDSKExtensions.h"
+#import "KFASHandlerAdditions-TypeTranslation.h"
@implementation BDSKSelectCommand
@@ -63,8 +64,13 @@
doc = [firstObject owner];
if ([doc isDocument] == NO)
doc = [(id)doc document];
- if (doc == nil)
- doc = (BibDocument *)[[NSApp orderedDocuments] firstObject];
+ if (doc == nil) {
+ id subject = [[[self appleEvent]
attributeDescriptorForKeyword:'subj'] objCObjectValue];
+ if ([subject
respondsToSelector:@selector(objectsByEvaluatingSpecifier)])
+ doc = [subject objectsByEvaluatingSpecifier];
+ if ([doc isKindOfClass:[BibDocument class]] == NO)
+ doc = (BibDocument *)[[NSApp orderedDocuments] firstObject];
+ }
[doc selectPublications:dP];
} else if ([firstObject isKindOfClass:[BDSKGroup class]]) {
doc = [firstObject document];
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit