|
From: <ho...@us...> - 2025-06-29 17:16:04
|
Revision: 15569
http://sourceforge.net/p/skim-app/code/15569
Author: hofman
Date: 2025-06-29 17:16:00 +0000 (Sun, 29 Jun 2025)
Log Message:
-----------
begin undo group once and set current note once when pasting note
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2025-06-29 17:12:02 UTC (rev 15568)
+++ trunk/SKPDFView.m 2025-06-29 17:16:00 UTC (rev 15569)
@@ -1233,6 +1233,8 @@
if ([newAnnotations count] > 0) {
+ [self beginNewUndoGroupIfNeededWithCommit:YES];
+
for (PDFAnnotation *newAnnotation in newAnnotations) {
NSRect bounds = [newAnnotation bounds];
@@ -1242,16 +1244,14 @@
[newAnnotation setBounds:bounds];
[newAnnotation registerUserName];
- [self beginNewUndoGroupIfNeededWithCommit:YES];
[[self document] addAnnotation:newAnnotation toPage:page];
- if (toolMode == SKToolModeText || toolMode == SKToolModeNote)
- [self setCurrentAnnotation:newAnnotation];
-
}
-
[[self undoManager] setActionName:NSLocalizedString(@"Add Note", @"Undo action name")];
+ if (toolMode == SKToolModeText || toolMode == SKToolModeNote)
+ [self setCurrentAnnotation:[newAnnotations lastObject]];
+
} else {
id str = nil;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|