Revision: 15404
http://sourceforge.net/p/skim-app/code/15404
Author: hofman
Date: 2025-06-08 08:37:40 +0000 (Sun, 08 Jun 2025)
Log Message:
-----------
Don't use variabble. Do not reset widgetValues when cpnverting notes, we still
save a pdf document with the original widgets, so default values do not have to
change
Modified Paths:
--------------
trunk/SKMainWindowController.m
Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m 2025-06-07 22:37:52 UTC (rev 15403)
+++ trunk/SKMainWindowController.m 2025-06-08 08:37:40 UTC (rev 15404)
@@ -1050,13 +1050,11 @@
}
- (void)addAnnotationsFromDictionaries:(NSArray *)noteDicts
removeAnnotations:(NSArray *)notesToRemove {
- // notesToRemove is either [self notes], nil, or non Skim notes
+ // notesToRemove is either nil (add), self.notes (replace), or non Skim
notes (convert)
BOOL isAddOrReplace = [notesToRemove count] == 0 || [[notesToRemove
firstObject] isSkimNote];
- PDFDocument *pdfDoc = [pdfView document];
NSMutableArray *widgetDicts = isAddOrReplace ? [NSMutableArray array] :
nil;
+ NSArray *notesAndPagesToAdd = [self
annotationsAndPagesFromDictionaries:noteDicts forDocument:[pdfView document]
autoUpdate:isAddOrReplace == NO widgetDictionaries:widgetDicts];
- NSArray *notesAndPagesToAdd = [self
annotationsAndPagesFromDictionaries:noteDicts forDocument:pdfDoc
autoUpdate:isAddOrReplace == NO widgetDictionaries:widgetDicts];
-
if (isAddOrReplace) {
if ([notesToRemove count]) {
[pdfView removePDFToolTipRects];
@@ -1073,11 +1071,6 @@
}
if ([widgetDicts count])
[self changeWidgetsFromDictionaries:widgetDicts];
- } else if ([widgets count]) {
- NSMapTable *values = [NSMapTable strongToStrongObjectsMapTable];
- for (PDFAnnotation *widget in widgets)
- [values setObject:[widget objectValue] forKey:widget];
- [self setWidgetValues:values];
}
[self addAnnotations:notesAndPagesToAdd removeAnnotations:notesToRemove];
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit