Browse Source

【综合】自定义图章日期注释宽度优化,修改笔记Undo优化

niehaoyu 8 months ago
parent
commit
8b3dc2b99e

+ 1 - 1
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListViewExtension/CPDFListView+Event.m

@@ -2605,7 +2605,7 @@ static inline CPDFAreaOfInterest CAreaOfInterestForResizeHandle(CRectEdges mask,
                     originalBounds.size.width = 500;
                     originalBounds.size.height = 30;
                     NSRect newBounds = [self getValidFreetText:((CPDFFreeTextAnnotation *)annotation) rect:originalBounds];
-                    originalBounds.size.width = newBounds.size.width;
+                    originalBounds.size.width = newBounds.size.width + 5;
                     originalBounds.size.height = newBounds.size.height;
                     annotation.bounds = originalBounds;
                     

+ 0 - 1
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListViewExtension/CPDFListView+UndoManager.m

@@ -103,7 +103,6 @@ static NSString *CPDFListViewAnnotationPropertiesObservationContext = @"CPDFList
             if([self.pdfListViewDelegate respondsToSelector:@selector(PDFListViewAnnotationAttributeHasChange:withAnnotation:)])
                 [self.pdfListViewDelegate PDFListViewAnnotationAttributeHasChange:self withAnnotation:note];
             
-            [self.window makeFirstResponder:nil];
             dispatch_async(dispatch_get_main_queue(), ^{
                 [[NSNotificationCenter defaultCenter] postNotificationName:CPDFListViewAnnotationsAttributeHasChangeNotification object:@{@"keyPath": keyPath, @"object": note}];
             });