Revision: 4878
http://skim-app.svn.sourceforge.net/skim-app/?rev=4878&view=rev
Author: hofman
Date: 2008-10-27 15:16:48 +0000 (Mon, 27 Oct 2008)
Log Message:
-----------
Make sure notes read for initial document load are added to the main window
controller. This is not done automatically, as the notification handler is not
yet registered.
Modified Paths:
--------------
trunk/SKMainWindowController.m
Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m 2008-10-27 14:32:39 UTC (rev 4877)
+++ trunk/SKMainWindowController.m 2008-10-27 15:16:48 UTC (rev 4878)
@@ -810,6 +810,7 @@
PDFAnnotation *annotation;
NSDictionary *dict;
PDFDocument *pdfDoc = [pdfView document];
+ NSMutableArray *observableNotes = [self
mutableArrayValueForKey:SKMainWindowNotesKey];
// create new annotations from the dictionary and add them to their page
and to the document
while (dict = [e nextObject]) {
@@ -821,6 +822,9 @@
pageIndex = [pdfDoc pageCount] - 1;
PDFPage *page = [pdfDoc pageAtIndex:pageIndex];
[pdfView addAnnotation:annotation toPage:page undoable:undoable];
+ // this is necessary for the initial load of the document, as the
notification handler is not yet registered
+ if ([observableNotes containsObject:annotation] == NO)
+ [observableNotes addObject:annotation];
[annotation release];
}
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit