Revision: 22613
          http://sourceforge.net/p/bibdesk/svn/22613
Author:   hofman
Date:     2018-09-15 13:57:02 +0000 (Sat, 15 Sep 2018)
Log Message:
-----------
not just document pubs are scriptable

Modified Paths:
--------------
    trunk/bibdesk/BDSKShowCommand.m

Modified: trunk/bibdesk/BDSKShowCommand.m
===================================================================
--- trunk/bibdesk/BDSKShowCommand.m     2018-09-15 13:49:14 UTC (rev 22612)
+++ trunk/bibdesk/BDSKShowCommand.m     2018-09-15 13:57:02 UTC (rev 22613)
@@ -75,14 +75,15 @@
                if ([dPO isKindOfClass:[BibItem class]]) {
                        // we want to open a publication
                        BibItem * pub = (BibItem*)dPO;
-            // only publications belonging to a BibDocument are scriptable
-                       [(BibDocument *)[pub owner] editPub:pub];
+            id <BDSKOwner> owner = [pub owner];
+            BibDocument *doc = [owner isDocument] ? (BibDocument *)owner : 
[(BDSKGroup *)owner document];
+                       [doc editPub:pub];
                }
                else if ([dPO isKindOfClass:[BibAuthor class]]) {
                        // we want to open an author
                        BibAuthor * author = (BibAuthor *) dPO;
-            // only publications belonging to a BibDocument are scriptable
-            BibDocument *doc = (BibDocument *)[[author publication] owner];
+            id <BDSKOwner> owner = [[author publication] owner];
+            BibDocument *doc = [owner isDocument] ? (BibDocument *)owner : 
[(BDSKGroup *)owner document];
             [doc showPerson:author];
                }
                else {

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

Reply via email to