Revision: 13644
http://sourceforge.net/p/skim-app/code/13644
Author: hofman
Date: 2023-09-07 14:59:18 +0000 (Thu, 07 Sep 2023)
Log Message:
-----------
register nil widget values, so it can be reset by an undo of a convert notes
action
Modified Paths:
--------------
trunk/SKMainWindowController.m
Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m 2023-09-06 18:00:45 UTC (rev 13643)
+++ trunk/SKMainWindowController.m 2023-09-07 14:59:18 UTC (rev 13644)
@@ -947,11 +947,8 @@
- (void)registerWidgets:(NSArray *)array {
[widgets addObjectsFromArray:array];
[self startObservingNotes:array];
- for (PDFAnnotation *annotation in array) {
- id value = [annotation objectValue];
- if (value)
- [widgetValues setObject:value forKey:annotation];
- }
+ for (PDFAnnotation *annotation in array)
+ [widgetValues setObject:[annotation objectValue] forKey:annotation];
}
- (void)makeWidgets {
@@ -1101,11 +1098,8 @@
if (isConvert) {
NSMapTable *values = [NSMapTable strongToStrongObjectsMapTable];
- for (PDFAnnotation *widget in widgets) {
- id value = [widget objectValue];
- if (value)
- [values setObject:value forKey:widget];
- }
+ for (PDFAnnotation *widget in widgets)
+ [values setObject:[widget objectValue] forKey:widget];
if ([values count])
[self setWidgetValues:values];
} else {
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