Revision: 15652 http://sourceforge.net/p/skim-app/code/15652 Author: hofman Date: 2025-07-13 08:18:23 +0000 (Sun, 13 Jul 2025) Log Message: ----------- textView and its string are never nil
Modified Paths: -------------- trunk/SKTextNoteEditor.m Modified: trunk/SKTextNoteEditor.m =================================================================== --- trunk/SKTextNoteEditor.m 2025-07-13 08:06:11 UTC (rev 15651) +++ trunk/SKTextNoteEditor.m 2025-07-13 08:18:23 UTC (rev 15652) @@ -90,7 +90,7 @@ } - (NSString *)currentString { - return [textView string] ?: [annotation string] ?: @""; + return [textView string]; } - (void)updateParagraphStyle { @@ -147,8 +147,8 @@ [annotation removeObserver:self forKeyPath:key context:&SKPDFAnnotationPropertiesObservationContext]; if (commit) { - NSString *newValue = [textView string] ?: @""; - if (textView && [newValue isEqualToString:[annotation string] ?: @""] == NO) + NSString *newValue = [textView string]; + if ([newValue isEqualToString:[annotation string] ?: @""] == NO) [annotation setString:newValue]; } @@ -233,7 +233,7 @@ [self updateParagraphStyle]; } else if ([keyPath isEqualToString:SKNPDFAnnotationStringKey]) { NSString *string = [annotation string] ?: @""; - if ([string isEqualToString:[textView string] ?: @""] == NO) { + if ([string isEqualToString:[textView string]] == NO) { [textView setString:string]; // the local undo stack is invalid now, and doing it undo safe leads to a weird stack [undoManager removeAllActions]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. _______________________________________________ Skim-app-commit mailing list Skim-app-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/skim-app-commit