|
@@ -539,8 +539,18 @@
|
|
|
}
|
|
|
|
|
|
[[[self undoManager] prepareWithInvocationTarget:self] moveAnnotationOnPage:aPage annotation:anAnnotation newIndex:originalIndex];
|
|
|
- [aPage moveHierarchyWithAnnotation:anAnnotation atIndex:newIndex];
|
|
|
- [self setNeedsDisplayAnnotationViewForVisiblePages];
|
|
|
+// [aPage moveHierarchyWithAnnotation:anAnnotation atIndex:newIndex];
|
|
|
+// [self setNeedsDisplayAnnotationViewForVisiblePages];
|
|
|
+ NSMutableArray *newAddArray = [NSMutableArray arrayWithArray:aPage.annotations];
|
|
|
+ for (CPDFAnnotation *anno in newAddArray) {
|
|
|
+ [aPage removeAnnotation:anno];
|
|
|
+ }
|
|
|
+ [newAddArray removeObject:anAnnotation];
|
|
|
+ [newAddArray insertObject:anAnnotation atIndex:newIndex];
|
|
|
+ for (NSUInteger i = 0; i < newAddArray.count; i++) {
|
|
|
+ [aPage addAnnotation:newAddArray[i]];
|
|
|
+ }
|
|
|
+ [self setNeedsDisplay:YES];
|
|
|
}
|
|
|
|
|
|
- (void)showHUDHint:(CPDFAnnotation *)newActiveAnnotation {
|