Revision: 7485
http://skim-app.svn.sourceforge.net/skim-app/?rev=7485&view=rev
Author: hofman
Date: 2011-09-09 12:00:35 +0000 (Fri, 09 Sep 2011)
Log Message:
-----------
new or copied scripting notes in document context only when using selection or
note from the same document
Modified Paths:
--------------
trunk/SKMainDocument.m
Modified: trunk/SKMainDocument.m
===================================================================
--- trunk/SKMainDocument.m 2011-09-09 09:37:05 UTC (rev 7484)
+++ trunk/SKMainDocument.m 2011-09-09 12:00:35 UTC (rev 7485)
@@ -1791,7 +1791,7 @@
PDFAnnotation *annotation = nil;
PDFSelection *selection = [PDFSelection
selectionWithSpecifier:[properties
objectForKey:SKPDFAnnotationSelectionSpecifierKey]];
PDFPage *page = [selection safeFirstPage];
- if (page == nil) {
+ if (page == nil || [page document] != [self pdfDocument]) {
[[NSScriptCommand currentCommand]
setScriptErrorNumber:NSReceiversCantHandleCommandScriptError];
} else {
annotation = [page newScriptingObjectOfClass:class
forValueForKey:key withContentsValue:contentsValue properties:properties];
@@ -1807,7 +1807,7 @@
if ([key isEqualToString:@"notes"]) {
NSMutableArray *copiedValue = [[NSMutableArray alloc] init];
for (PDFAnnotation *annotation in value) {
- if ([annotation isMovable]) {
+ if ([annotation isMovable] && [[annotation page] document] ==
[self pdfDocument]) {
PDFAnnotation *copiedAnnotation = [[PDFAnnotation alloc]
initSkimNoteWithProperties:[annotation SkimNoteProperties]];
[copiedAnnotation registerUserName];
if ([copiedAnnotation respondsToSelector:@selector(setPage:)])
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Why Cloud-Based Security and Archiving Make Sense
Osterman Research conducted this study that outlines how and why cloud
computing security and archiving is rapidly being adopted across the IT
space for its ease of implementation, lower cost, and increased
reliability. Learn more. http://www.accelacomm.com/jaw/sfnl/114/51425301/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit