|
@@ -116,6 +116,9 @@ static NSString *CPDFListViewAnnotationPropertiesObservationContext = @"CPDFList
|
|
|
|
|
|
- (void)PDFPageDidLoadAnnotationNotification:(NSNotification *)notification {
|
|
|
CPDFAnnotation *annotation = [notification object];
|
|
|
+ if ([annotation.page.document isEqualTo:self.document] == false) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
if (annotation.page &&
|
|
|
[annotation isKindOfClass:[CPDFAnnotation class]] &&
|
|
|
![annotation isKindOfClass:[CPDFLinkAnnotation class]]) {
|
|
@@ -125,6 +128,9 @@ static NSString *CPDFListViewAnnotationPropertiesObservationContext = @"CPDFList
|
|
|
|
|
|
- (void)PDFPageDidAddAnnotationNotification:(NSNotification *)notification {
|
|
|
CPDFAnnotation *annotation = [notification object];
|
|
|
+ if ([annotation.page.document isEqualTo:self.document] == false) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
if ([annotation isKindOfClass:[CPDFAnnotation class]] &&
|
|
|
![annotation isKindOfClass:[CPDFLinkAnnotation class]]) {
|
|
|
[self startObservingNotes:@[annotation]];
|
|
@@ -133,6 +139,9 @@ static NSString *CPDFListViewAnnotationPropertiesObservationContext = @"CPDFList
|
|
|
|
|
|
- (void)PDFPageDidRemoveAnnotationNotification:(NSNotification *)notification {
|
|
|
CPDFAnnotation *annotation = [notification object];
|
|
|
+ if ([annotation.page.document isEqualTo:self.document] == false) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
if (annotation.page &&
|
|
|
[annotation isKindOfClass:[CPDFAnnotation class]]) {
|
|
|
|