Revision: 6433
http://skim-app.svn.sourceforge.net/skim-app/?rev=6433&view=rev
Author: hofman
Date: 2010-04-07 21:24:50 +0000 (Wed, 07 Apr 2010)
Log Message:
-----------
retain activeAnnotation
Modified Paths:
--------------
trunk/SKPDFView.h
trunk/SKPDFView.m
Modified: trunk/SKPDFView.h
===================================================================
--- trunk/SKPDFView.h 2010-04-07 17:08:28 UTC (rev 6432)
+++ trunk/SKPDFView.h 2010-04-07 21:24:50 UTC (rev 6433)
@@ -132,7 +132,7 @@
@property (nonatomic) SKToolMode toolMode;
@property (nonatomic) SKNoteType annotationMode;
@property (nonatomic, readonly) SKInteractionMode interactionMode;
-...@property (nonatomic, assign) PDFAnnotation *activeAnnotation;
+...@property (nonatomic, retain) PDFAnnotation *activeAnnotation;
@property (nonatomic, readonly) BOOL isEditing;
@property (nonatomic) NSRect currentSelectionRect;
@property (nonatomic, retain) PDFPage *currentSelectionPage;
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2010-04-07 17:08:28 UTC (rev 6432)
+++ trunk/SKPDFView.m 2010-04-07 21:24:50 UTC (rev 6433)
@@ -274,6 +274,7 @@
[[SKPDFToolTipWindow sharedToolTipWindow] orderOut:self];
[self removePDFToolTipRects];
SKDESTROY(trackingArea);
+ SKDESTROY(activeAnnotation);
[typeSelectHelper setDataSource:nil];
SKDESTROY(typeSelectHelper);
SKDESTROY(transitionController);
@@ -508,17 +509,17 @@
[self commitEditing];
}
- // Assign.
- if (newAnnotation) {
- activeAnnotation = newAnnotation;
-
- // Force redisplay.
- [self setNeedsDisplayForAnnotation:activeAnnotation];
- } else {
- activeAnnotation = nil;
- }
-
if (changed) {
+ // Assign.
+ [activeAnnotation release];
+ if (newAnnotation) {
+ activeAnnotation = [newAnnotation retain];
+ // Force redisplay.
+ [self setNeedsDisplayForAnnotation:activeAnnotation];
+ } else {
+ activeAnnotation = nil;
+ }
+
[[NSNotificationCenter defaultCenter]
postNotificationName:SKPDFViewActiveAnnotationDidChangeNotification
object:self];
NSAccessibilityPostNotification(NSAccessibilityUnignoredAncestor([self
documentView]), NSAccessibilityFocusedUIElementChangedNotification);
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit