Browse Source

Merge branch 'develop_2025' of git.kdan.cc:Mac_PDF/PDF_Office into develop_2025

zenghong 3 weeks ago
parent
commit
819cec09ad

+ 1 - 0
PDF Office/KMComponentLibrary/KMComponentLibrary/View/GroupItem/ComponentGroup.swift

@@ -211,6 +211,7 @@ public class ComponentGroup: NSView, NibLoadable {
         
         if let window = windowVC.window {
             window.contentView?.addSubview(self)
+            window.level = .statusBar            
         }
         
         clearMonitor()

+ 44 - 2
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFKitExtensions/CPDFListViewExtension/CPDFListView+Event.m

@@ -43,6 +43,14 @@ static inline CPDFAreaOfInterest CAreaOfInterestForResizeHandle(CRectEdges mask,
 #pragma mark - MouseEvent
 
 - (void)mouseDown:(NSEvent *)theEvent {
+    if(self.isEnableEdit == NO) {
+        NSPoint newpoint = [self convertPoint:[theEvent locationInWindow] fromView:nil];
+        CPDFAreaOfInterest area1 = [self areaOfInterestForPoint:newpoint];
+        if (area1 & CPDFTextArea) {
+            [super mouseDown:theEvent];
+        }
+        return;
+    }
     [self setCursorForMouse:theEvent];
     
     NSPoint point = NSZeroPoint;
@@ -122,6 +130,12 @@ static inline CPDFAreaOfInterest CAreaOfInterestForResizeHandle(CRectEdges mask,
                 if(newActiveAnnotation.isForm) {
                     if(self.toolMode == CFormToolMode) {
                         isSupportAdd = YES;
+                        if([newActiveAnnotation isKindOfClass:[CPDFSignatureWidgetAnnotation class]]) {
+                            CPDFSignatureWidgetAnnotation *signatureWidget = (CPDFSignatureWidgetAnnotation *)newActiveAnnotation;
+                            if(signatureWidget.isSigned) {
+                                isSupportAdd = NO;
+                            }
+                        }
                     }
                 } else if ([newActiveAnnotation isKindOfClass:[CPDFRedactAnnotation class]]) {
                     if(self.toolMode == CRedactToolMode) {
@@ -162,7 +176,14 @@ static inline CPDFAreaOfInterest CAreaOfInterestForResizeHandle(CRectEdges mask,
             if([newActiveAnnotation isForm]) {
                 if (self.toolMode == CFormToolMode) {
                     CPDFPage *page = self.activeAnnotation.page;
-                    if (![self.activeAnnotations containsObject:newActiveAnnotation]) {
+                    BOOL isSupportAdd = YES;
+                    if([newActiveAnnotation isKindOfClass:[CPDFSignatureWidgetAnnotation class]]) {
+                        CPDFSignatureWidgetAnnotation *signatureWidget = (CPDFSignatureWidgetAnnotation *)newActiveAnnotation;
+                        if(signatureWidget.isSigned) {
+                            isSupportAdd = NO;
+                        }
+                    }
+                    if (![self.activeAnnotations containsObject:newActiveAnnotation] && isSupportAdd) {
                         [self updateActiveAnnotations:@[newActiveAnnotation]];
                         [self setNeedsDisplayAnnotationViewForPage:page];
                     }
@@ -305,7 +326,7 @@ static inline CPDFAreaOfInterest CAreaOfInterestForResizeHandle(CRectEdges mask,
     }
 }
 
-- (void)mouseMoved:(NSEvent *)event {    
+- (void)mouseMoved:(NSEvent *)event {
     if ([CMetalShared metalShared].scaleState == CPDFViewScaleStateBegin ||
         [CMetalShared metalShared].scaleState == CPDFViewScaleStateChange ||
         [CMetalShared metalShared].scrollState == CPDFViewScrollStateBegin ||
@@ -313,6 +334,9 @@ static inline CPDFAreaOfInterest CAreaOfInterestForResizeHandle(CRectEdges mask,
         [CMetalShared metalShared].renderType == CRenderTypeRendering) {
         return;
     }
+    if(self.isEnableEdit == NO) {
+        return;
+    }
     
     if(self.isPresentationMode) {
         NSPoint tPoint = [event locationInView:self];
@@ -543,6 +567,13 @@ static inline CPDFAreaOfInterest CAreaOfInterestForResizeHandle(CRectEdges mask,
                      CMoveToolMode== self.toolMode)) {
                     clickNewActiveAnnotation = nil;
                 }
+                
+                if([clickNewActiveAnnotation isKindOfClass:[CPDFSignatureWidgetAnnotation class]]) {
+                    CPDFSignatureWidgetAnnotation *signatureWidget = (CPDFSignatureWidgetAnnotation *)clickNewActiveAnnotation;
+                    if(signatureWidget.isSigned) {
+                        clickNewActiveAnnotation = nil;
+                    }
+                }
             } else if ([newActiveAnnotation isKindOfClass:[CPDFMovieAnnotation class]] ||
                        [newActiveAnnotation isKindOfClass:[CPDFSoundAnnotation class]]) {
                 if ([KMImageToolTipWindow shared].isVisible == YES) {
@@ -694,6 +725,10 @@ static inline CPDFAreaOfInterest CAreaOfInterestForResizeHandle(CRectEdges mask,
     }
 }
 
+- (BOOL)acceptsFirstResponder {
+    return YES;
+}
+
 #pragma mark - NSMenu
 
 - (NSMenu *)menuForEvent:(NSEvent *)event {
@@ -730,6 +765,13 @@ static inline CPDFAreaOfInterest CAreaOfInterestForResizeHandle(CRectEdges mask,
             if ([newActiveAnnotation isKindOfClass:[CPDFWidgetAnnotation class]] ){
                 if(CFormToolMode != self.toolMode)
                     newActiveAnnotation = nil;
+                
+                if([newActiveAnnotation isKindOfClass:[CPDFSignatureWidgetAnnotation class]]) {
+                    CPDFSignatureWidgetAnnotation *signatureWidget = (CPDFSignatureWidgetAnnotation *)newActiveAnnotation;
+                    if(signatureWidget.isSigned) {
+                        newActiveAnnotation = nil;
+                    }
+                }
             } else if([newActiveAnnotation isKindOfClass:[CPDFRedactAnnotation class]]) {
                 if(CRedactToolMode != self.toolMode)
                     newActiveAnnotation = nil;

+ 2 - 0
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.h

@@ -233,6 +233,8 @@ enum {
 
 @property (nonatomic, readonly) BOOL isSyncSplitView;
 
+@property (nonatomic, assign) BOOL isEnableEdit;
+
 @property (nonatomic, strong) KMDrawView *presentationDrawView;
 
 - (CPDFAnnotation *)addAnnotationWithType:(CAnnotationType)annotationType selection:(CPDFSelection *)selection page:(CPDFPage *)page bounds:(NSRect)bounds;

+ 5 - 0
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.m

@@ -96,6 +96,7 @@ void CPDFListViewOCDrawLineHandles(CGContextRef context, CGRect rect, CGFloat ra
 - (id)init {
     self = [super init];
     if (self) {
+        self.isEnableEdit = YES;
         [self commonInitialization];
     }
     return self;
@@ -104,6 +105,7 @@ void CPDFListViewOCDrawLineHandles(CGContextRef context, CGRect rect, CGFloat ra
 - (id)initWithFrame:(NSRect)frameRect {
     self = [super initWithFrame:frameRect];
     if (self) {
+        self.isEnableEdit = YES;
         [self commonInitialization];
     }
     return self;
@@ -112,6 +114,7 @@ void CPDFListViewOCDrawLineHandles(CGContextRef context, CGRect rect, CGFloat ra
 - (id)initWithCoder:(NSCoder *)decoder {
     self = [super initWithCoder:decoder];
     if (self) {
+        self.isEnableEdit = YES;
         [self commonInitialization];
     }
     return self;
@@ -292,6 +295,7 @@ void CPDFListViewOCDrawLineHandles(CGContextRef context, CGRect rect, CGFloat ra
     }
     return YES;
 }
+
 #pragma mark - Setter & Get
 
 - (KMDrawView *)presentationDrawView {
@@ -442,6 +446,7 @@ void CPDFListViewOCDrawLineHandles(CGContextRef context, CGRect rect, CGFloat ra
         });
         [self resetPDFViewAnnotation];
         [self resetPDFToolTipRectsForAfterDelay];
+        [self.window makeFirstResponder:self];
         
         if(isDisplayAnnotationView)
             [self setNeedsDisplayAnnotationViewForVisiblePages];

+ 101 - 121
PDF Office/PDF Master/KMClass/KMPDFViewController/KMMainViewController.swift

@@ -6055,7 +6055,7 @@ extension KMMainViewController: CPDFViewDelegate,CPDFListViewDelegate {
                 } else {
                     let currentSelection = pdfListView.currentSelection
                     if currentSelection != nil {
-                        if currentSelection?.selectionType() == .text {
+                        if currentSelection?.selectionType() == .text && pdfListView == self.listView {
                             menuStringArr.append(PDFViewMenuIdentifier_Normal_AITool)
                             menuStringArr.append(PDFViewMenuIdentifier_Space)
                             menuStringArr.append(PDFViewMenuIdentifier_Normal_Copy)
@@ -6075,7 +6075,7 @@ extension KMMainViewController: CPDFViewDelegate,CPDFListViewDelegate {
                             menuStringArr.append(PDFViewMenuIdentifier_Space)
                             menuStringArr.append(PDFViewMenuIdentifier_Normal_TTS)
                             menuStringArr.append(PDFViewMenuIdentifier_Normal_SearchText)
-                        } else if currentSelection?.selectionType() == .image {
+                        } else if currentSelection?.selectionType() == .image && pdfListView == self.listView {
                             menuStringArr.append(PDFViewMenuIdentifier_Normal_Copy)
                             if pdfListView.canPaste() {
                                 menuStringArr.append(PDFViewMenuIdentifier_Normal_Past)
@@ -6087,111 +6087,95 @@ extension KMMainViewController: CPDFViewDelegate,CPDFListViewDelegate {
                             menuStringArr.append(PDFViewMenuIdentifier_Normal_Circle)
                         }
                     } else {
-                        if pdfListView.toolMode == .CFormToolMode {
-                            if pdfListView.canPaste() {
-                                menuStringArr.append(PDFViewMenuIdentifier_Normal_Past)
-                            }
-                            menuStringArr.append(PDFViewMenuIdentifier_Space)
-                            menuStringArr.append(PDFViewMenuIdentifier_Normal_SelectAllForm)
-                            menuStringArr.append(PDFViewMenuIdentifier_Space)
-                            menuStringArr.append(PDFViewMenuIdentifier_Normal_HightForm)
-                            menuStringArr.append(PDFViewMenuIdentifier_Normal_ShowFormName)
-                            menuStringArr.append(PDFViewMenuIdentifier_Normal_RestForm)
-                            menuStringArr.append(PDFViewMenuIdentifier_Space)
-                            menuStringArr.append(PDFViewMenuIdentifier_Normal_AddBook)
-                            menuStringArr.append(PDFViewMenuIdentifier_Space)
-                            menuStringArr.append(PDFViewMenuIdentifier_Normal_ViewTools)
-                            menuStringArr.append(PDFViewMenuIdentifier_Space)
-                            menuStringArr.append(PDFViewMenuIdentifier_Normal_PageView)
-                            menuStringArr.append(PDFViewMenuIdentifier_Space)
-                            menuStringArr.append(PDFViewMenuIdentifier_Normal_Scale)
-                            menuStringArr.append(PDFViewMenuIdentifier_Space)
-                            menuStringArr.append(PDFViewMenuIdentifier_Normal_PageRotate)
-                            menuStringArr.append(PDFViewMenuIdentifier_Space)
-                            menuStringArr.append(PDFViewMenuIdentifier_Normal_PageNum)
-                            menuStringArr.append(PDFViewMenuIdentifier_Space)
-                            menuStringArr.append(PDFViewMenuIdentifier_Normal_Search)
-                            menuStringArr.append(PDFViewMenuIdentifier_Normal_Print)
-                            menuStringArr.append(PDFViewMenuIdentifier_Normal_Properties)
-                        } else if pdfListView.toolMode == .CRedactToolMode {
-                            menuStringArr.append(PDFViewMenuIdentifier_Normal_SelectAllText)
-                            menuStringArr.append(PDFViewMenuIdentifier_Space)
-                            menuStringArr.append(PDFViewMenuIdentifier_Normal_AddBook)
-                            menuStringArr.append(PDFViewMenuIdentifier_Space)
-                            menuStringArr.append(PDFViewMenuIdentifier_Normal_ViewTools)
-                            menuStringArr.append(PDFViewMenuIdentifier_Space)
-                            menuStringArr.append(PDFViewMenuIdentifier_Normal_PageView)
-                            menuStringArr.append(PDFViewMenuIdentifier_Space)
-                            menuStringArr.append(PDFViewMenuIdentifier_Normal_Scale)
-                            menuStringArr.append(PDFViewMenuIdentifier_Space)
-                            menuStringArr.append(PDFViewMenuIdentifier_Normal_PageRotate)
-                            menuStringArr.append(PDFViewMenuIdentifier_Space)
-                            menuStringArr.append(PDFViewMenuIdentifier_Normal_PageNum)
-                            menuStringArr.append(PDFViewMenuIdentifier_Space)
-                            menuStringArr.append(PDFViewMenuIdentifier_Normal_HightLink)
-                            menuStringArr.append(PDFViewMenuIdentifier_Normal_HightForm)
-                            menuStringArr.append(PDFViewMenuIdentifier_Normal_RestForm)
-                            menuStringArr.append(PDFViewMenuIdentifier_Space)
-                            menuStringArr.append(PDFViewMenuIdentifier_Normal_Search)
-                            menuStringArr.append(PDFViewMenuIdentifier_Normal_Print)
-                            menuStringArr.append(PDFViewMenuIdentifier_Normal_Properties)
-                        } else {
-                            if(listView.viewSplitMode != .disable) {
-                                menuStringArr.append(PDFViewMenuIdentifier_Split_ViewMode)
-                                menuStringArr.append(PDFViewMenuIdentifier_Split_Sync)
-                                menuStringArr.append(PDFViewMenuIdentifier_Split_ShowBar)
+                        if(pdfListView == self.listView) {
+                            if pdfListView.toolMode == .CFormToolMode {
+                                if pdfListView.canPaste() {
+                                    menuStringArr.append(PDFViewMenuIdentifier_Normal_Past)
+                                }
                                 menuStringArr.append(PDFViewMenuIdentifier_Space)
-                            } else {
-                                menuStringArr.append(PDFViewMenuIdentifier_Normal_AITool)
+                                menuStringArr.append(PDFViewMenuIdentifier_Normal_SelectAllForm)
                                 menuStringArr.append(PDFViewMenuIdentifier_Space)
-                                if pdfListView == listView {
-                                    if pdfListView.canPaste() {
-                                        menuStringArr.append(PDFViewMenuIdentifier_Normal_Past)
-                                    }
-                                    menuStringArr.append(PDFViewMenuIdentifier_Normal_SelectAllText)
-                                    menuStringArr.append(PDFViewMenuIdentifier_Normal_SelectAllAnnotation)
-                                    menuStringArr.append(PDFViewMenuIdentifier_Space)
-                                    menuStringArr.append(PDFViewMenuIdentifier_Normal_ShowAnnotation)
+                                menuStringArr.append(PDFViewMenuIdentifier_Normal_HightForm)
+                                menuStringArr.append(PDFViewMenuIdentifier_Normal_ShowFormName)
+                                menuStringArr.append(PDFViewMenuIdentifier_Normal_RestForm)
+                                menuStringArr.append(PDFViewMenuIdentifier_Space)
+                                menuStringArr.append(PDFViewMenuIdentifier_Normal_AddBook)
+                                menuStringArr.append(PDFViewMenuIdentifier_Space)
+                                menuStringArr.append(PDFViewMenuIdentifier_Normal_ViewTools)
+                                menuStringArr.append(PDFViewMenuIdentifier_Space)
+                                menuStringArr.append(PDFViewMenuIdentifier_Normal_PageView)
+                                menuStringArr.append(PDFViewMenuIdentifier_Space)
+                                menuStringArr.append(PDFViewMenuIdentifier_Normal_Scale)
+                                menuStringArr.append(PDFViewMenuIdentifier_Space)
+                                menuStringArr.append(PDFViewMenuIdentifier_Normal_PageRotate)
+                                menuStringArr.append(PDFViewMenuIdentifier_Space)
+                                menuStringArr.append(PDFViewMenuIdentifier_Normal_PageNum)
+                                menuStringArr.append(PDFViewMenuIdentifier_Space)
+                                menuStringArr.append(PDFViewMenuIdentifier_Normal_Search)
+                                menuStringArr.append(PDFViewMenuIdentifier_Normal_Print)
+                                menuStringArr.append(PDFViewMenuIdentifier_Normal_Properties)
+                            } else if pdfListView.toolMode == .CRedactToolMode {
+                                
+                            } else {
+                                if(listView.viewSplitMode != .disable) {
+                                    menuStringArr.append(PDFViewMenuIdentifier_Split_ViewMode)
+                                    menuStringArr.append(PDFViewMenuIdentifier_Split_Sync)
+                                    menuStringArr.append(PDFViewMenuIdentifier_Split_ShowBar)
                                     menuStringArr.append(PDFViewMenuIdentifier_Space)
-                                    menuStringArr.append(PDFViewMenuIdentifier_Normal_AddBook)
+                                } else {
+                                    menuStringArr.append(PDFViewMenuIdentifier_Normal_AITool)
                                     menuStringArr.append(PDFViewMenuIdentifier_Space)
+                                    if pdfListView == listView {
+                                        if pdfListView.canPaste() {
+                                            menuStringArr.append(PDFViewMenuIdentifier_Normal_Past)
+                                        }
+                                        menuStringArr.append(PDFViewMenuIdentifier_Normal_SelectAllText)
+                                        menuStringArr.append(PDFViewMenuIdentifier_Normal_SelectAllAnnotation)
+                                        menuStringArr.append(PDFViewMenuIdentifier_Space)
+                                        menuStringArr.append(PDFViewMenuIdentifier_Normal_ShowAnnotation)
+                                        menuStringArr.append(PDFViewMenuIdentifier_Space)
+                                        menuStringArr.append(PDFViewMenuIdentifier_Normal_AddBook)
+                                        menuStringArr.append(PDFViewMenuIdentifier_Space)
+                                    }
                                 }
+                                menuStringArr.append(PDFViewMenuIdentifier_Normal_ViewTools)
+                                menuStringArr.append(PDFViewMenuIdentifier_Space)
+                        
+                                menuStringArr.append(PDFViewMenuIdentifier_Normal_PageView)
+                                if(listView.viewSplitMode != .disable) {
+                                } else {
+                                    menuStringArr.append(PDFViewMenuIdentifier_Normal_ReadMode)
+                                }
+                                menuStringArr.append(PDFViewMenuIdentifier_Space)
+                                menuStringArr.append(PDFViewMenuIdentifier_Normal_Scale)
+                                menuStringArr.append(PDFViewMenuIdentifier_Space)
+                                menuStringArr.append(PDFViewMenuIdentifier_Normal_PageRotate)
+                                menuStringArr.append(PDFViewMenuIdentifier_Space)
+                                menuStringArr.append(PDFViewMenuIdentifier_Normal_PageNum)
+                                menuStringArr.append(PDFViewMenuIdentifier_Space)
+                                menuStringArr.append(PDFViewMenuIdentifier_Normal_AutoScroll)
+                                menuStringArr.append(PDFViewMenuIdentifier_Space)
+                                menuStringArr.append(PDFViewMenuIdentifier_Normal_HightLink)
+                                menuStringArr.append(PDFViewMenuIdentifier_Normal_HightForm)
+                                menuStringArr.append(PDFViewMenuIdentifier_Normal_RestForm)
+                                menuStringArr.append(PDFViewMenuIdentifier_Space)
+                                menuStringArr.append(PDFViewMenuIdentifier_Normal_Search)
+                                menuStringArr.append(PDFViewMenuIdentifier_Normal_Print)
+                                menuStringArr.append(PDFViewMenuIdentifier_Normal_Properties)
                             }
-                            menuStringArr.append(PDFViewMenuIdentifier_Normal_ViewTools)
-                            menuStringArr.append(PDFViewMenuIdentifier_Space)
-                    
-                            menuStringArr.append(PDFViewMenuIdentifier_Normal_PageView)
-                            if(listView.viewSplitMode != .disable) {
-                            } else {
-                                menuStringArr.append(PDFViewMenuIdentifier_Normal_ReadMode)
-                            }
-                            menuStringArr.append(PDFViewMenuIdentifier_Space)
-                            menuStringArr.append(PDFViewMenuIdentifier_Normal_Scale)
-                            menuStringArr.append(PDFViewMenuIdentifier_Space)
-                            menuStringArr.append(PDFViewMenuIdentifier_Normal_PageRotate)
-                            menuStringArr.append(PDFViewMenuIdentifier_Space)
-                            menuStringArr.append(PDFViewMenuIdentifier_Normal_PageNum)
-                            menuStringArr.append(PDFViewMenuIdentifier_Space)
-                            menuStringArr.append(PDFViewMenuIdentifier_Normal_AutoScroll)
-                            menuStringArr.append(PDFViewMenuIdentifier_Space)
-                            menuStringArr.append(PDFViewMenuIdentifier_Normal_HightLink)
-                            menuStringArr.append(PDFViewMenuIdentifier_Normal_HightForm)
-                            menuStringArr.append(PDFViewMenuIdentifier_Normal_RestForm)
-                            menuStringArr.append(PDFViewMenuIdentifier_Space)
-                            menuStringArr.append(PDFViewMenuIdentifier_Normal_Search)
-                            menuStringArr.append(PDFViewMenuIdentifier_Normal_Print)
-                            menuStringArr.append(PDFViewMenuIdentifier_Normal_Properties)
                         }
+
                     }
                 }
-                let menuStruct = KMPDFMenuConfig.clickMenuUI(items: menuStringArr, theEvent: theEvent, listView: pdfListView)
-                groupListMenuGroup?.pagePoint = pagePoint
-                groupListMenuGroup?.groupDelegate = self
-                groupListMenuGroup?.frame = CGRectMake(0, 0, 180, menuStruct.viewHeight)
-                groupListMenuGroup?.updateGroupInfo(menuStruct.menuitems)
-    
-                groupListMenuGroup?.showWithPoint(CGPoint(x: point.x, y: point.y - menuStruct.viewHeight), relativeTo: nil, withWindow: self.view.window)
-
+                if(menuStringArr.count > 0) {
+                    let menuStruct = KMPDFMenuConfig.clickMenuUI(items: menuStringArr, theEvent: theEvent, listView: pdfListView)
+                    groupListMenuGroup?.pagePoint = pagePoint
+                    groupListMenuGroup?.groupDelegate = self
+                    groupListMenuGroup?.frame = CGRectMake(0, 0, 180, menuStruct.viewHeight)
+                    groupListMenuGroup?.updateGroupInfo(menuStruct.menuitems)
+                    
+                    groupListMenuGroup?.showWithPoint(CGPoint(x: point.x, y: point.y - menuStruct.viewHeight), relativeTo: nil, withWindow: self.view.window)
+                }
             }
         } else {
             var menuStringArr: [String] = []
@@ -6245,7 +6229,7 @@ extension KMMainViewController: CPDFViewDelegate,CPDFListViewDelegate {
             
             groupListMenuGroup?.showWithPoint(CGPoint(x: windowPoint.x, y: windowPoint.y - menuStruct.viewHeight), relativeTo: nil)
         } else {
-            let isShowPopUI:Bool = !SettingsManager.sharedInstance.showQuickActionBar
+            let isShowPopUI:Bool = true
             var menuStringArr: [String] = []
             let editingAreas = listView.km_EditingAreas()
             let firstEditingArea = editingAreas.first
@@ -6279,7 +6263,6 @@ extension KMMainViewController: CPDFViewDelegate,CPDFListViewDelegate {
                         if listView.isSupportPast() {
                             menuStringArr.append(PDFViewMenuIdentifier_Edit_NoStylePaste)
                         }
-                        menuStringArr.append(PDFViewMenuIdentifier_Edit_SelectAll)
                         menuStringArr.append(PDFViewMenuIdentifier_Normal_Delete)
                         menuStringArr.append(PDFViewMenuIdentifier_Space)
                         
@@ -6299,8 +6282,8 @@ extension KMMainViewController: CPDFViewDelegate,CPDFListViewDelegate {
                         menuStringArr.append(PDFViewMenuIdentifier_Space)
                         menuStringArr.append(PDFViewMenuIdentifier_Edit_RotateLeft)
                         menuStringArr.append(PDFViewMenuIdentifier_Edit_RotateRight)
-                        menuStringArr.append(PDFViewMenuIdentifier_Edit_HorizontalMirror)
                         menuStringArr.append(PDFViewMenuIdentifier_Edit_VerticalMirror)
+                        menuStringArr.append(PDFViewMenuIdentifier_Edit_HorizontalMirror)
                         menuStringArr.append(PDFViewMenuIdentifier_Space)
                         menuStringArr.append(PDFViewMenuIdentifier_Normal_Export)
                         if(isShowPopUI){
@@ -6324,7 +6307,6 @@ extension KMMainViewController: CPDFViewDelegate,CPDFListViewDelegate {
                             menuStringArr.append(PDFViewMenuIdentifier_Edit_NoStylePaste)
                         }
                         menuStringArr.append(PDFViewMenuIdentifier_Edit_SelectAll)
-                        menuStringArr.append(PDFViewMenuIdentifier_Space)
                     } else {
                         let editState = listView.editStatus()
                         if (editState == .editSelectText) {// 选择文本
@@ -6335,7 +6317,6 @@ extension KMMainViewController: CPDFViewDelegate,CPDFListViewDelegate {
                             }
                             menuStringArr.append(PDFViewMenuIdentifier_Edit_SelectAll)
                             menuStringArr.append(PDFViewMenuIdentifier_Normal_Delete)
-                            menuStringArr.append(PDFViewMenuIdentifier_Space)
                         } else  {
                             menuStringArr.append(PDFViewMenuIdentifier_Normal_Copy)
                             menuStringArr.append(PDFViewMenuIdentifier_Normal_Cut)
@@ -6347,16 +6328,16 @@ extension KMMainViewController: CPDFViewDelegate,CPDFListViewDelegate {
                             }
                             menuStringArr.append(PDFViewMenuIdentifier_Edit_SelectAll)
                             menuStringArr.append(PDFViewMenuIdentifier_Normal_Delete)
-                            menuStringArr.append(PDFViewMenuIdentifier_Space)
-                        }
-                        menuStringArr.append(PDFViewMenuIdentifier_Edit_Font)
-                        menuStringArr.append(PDFViewMenuIdentifier_Edit_FontName)
-                        menuStringArr.append(PDFViewMenuIdentifier_Edit_FontAlight)
-                        if(isShowPopUI){
-                            menuStringArr.append(PDFViewMenuIdentifier_Space)
-                            menuStringArr.append(PDFViewMenuIdentifier_Normal_ShowPopUI)
                         }
                     }
+                    menuStringArr.append(PDFViewMenuIdentifier_Space)
+                    menuStringArr.append(PDFViewMenuIdentifier_Edit_Font)
+                    menuStringArr.append(PDFViewMenuIdentifier_Edit_FontName)
+                    menuStringArr.append(PDFViewMenuIdentifier_Edit_FontAlight)
+                    if(isShowPopUI){
+                        menuStringArr.append(PDFViewMenuIdentifier_Space)
+                        menuStringArr.append(PDFViewMenuIdentifier_Normal_ShowPopUI)
+                    }
                 } else if firstEditingArea?.isImageArea() == true {
                     menuStringArr.append(PDFViewMenuIdentifier_Normal_Copy)
                     menuStringArr.append(PDFViewMenuIdentifier_Normal_Cut)
@@ -6364,8 +6345,8 @@ extension KMMainViewController: CPDFViewDelegate,CPDFListViewDelegate {
                     menuStringArr.append(PDFViewMenuIdentifier_Space)
                     menuStringArr.append(PDFViewMenuIdentifier_Edit_RotateLeft)
                     menuStringArr.append(PDFViewMenuIdentifier_Edit_RotateRight)
-                    menuStringArr.append(PDFViewMenuIdentifier_Edit_HorizontalMirror)
                     menuStringArr.append(PDFViewMenuIdentifier_Edit_VerticalMirror)
+                    menuStringArr.append(PDFViewMenuIdentifier_Edit_HorizontalMirror)
                     menuStringArr.append(PDFViewMenuIdentifier_Space)
                     menuStringArr.append(PDFViewMenuIdentifier_Edit_Crop)
                     menuStringArr.append(PDFViewMenuIdentifier_Edit_Replace)
@@ -6376,12 +6357,13 @@ extension KMMainViewController: CPDFViewDelegate,CPDFListViewDelegate {
                     }
                 }
             } else {
-                if(listView.isSupportPastMatchStyle()) {
-                    menuStringArr.append(PDFViewMenuIdentifier_Edit_Paste)
-                }
                 if(listView.isSupportPast()) {
                     menuStringArr.append(PDFViewMenuIdentifier_Edit_NoStylePaste)
                 }
+                if(listView.isSupportPastMatchStyle()) {
+                    menuStringArr.append(PDFViewMenuIdentifier_Edit_Paste)
+                }
+            
                 menuStringArr.append(PDFViewMenuIdentifier_Edit_SelectAll)
                 menuStringArr.append(PDFViewMenuIdentifier_Space)
                 menuStringArr.append(PDFViewMenuIdentifier_Edit_AddText)
@@ -6392,8 +6374,6 @@ extension KMMainViewController: CPDFViewDelegate,CPDFListViewDelegate {
                 menuStringArr.append(PDFViewMenuIdentifier_Space)
                 menuStringArr.append(PDFViewMenuIdentifier_Normal_ViewTools)
                 menuStringArr.append(PDFViewMenuIdentifier_Space)
-                menuStringArr.append(PDFViewMenuIdentifier_Normal_PageView)
-                menuStringArr.append(PDFViewMenuIdentifier_Space)
                 menuStringArr.append(PDFViewMenuIdentifier_Normal_Scale)
                 menuStringArr.append(PDFViewMenuIdentifier_Space)
                 menuStringArr.append(PDFViewMenuIdentifier_Normal_PageRotate)
@@ -6528,7 +6508,7 @@ extension KMMainViewController: CPDFViewDelegate,CPDFListViewDelegate {
     }
     
     func pdfListViewSyncSplitView() -> Bool {
-        return viewManager.splitShowBottomBar
+        return viewManager.splitSyncScroll
     }
     
     func pdfListViewEndEditMode(_ pdfListView: CPDFListView!) {
@@ -7446,7 +7426,7 @@ extension KMMainViewController: ComponentGroupDelegate {
         } else if(menuItemProperty?.identifier == PDFViewMenuIdentifier_Edit_FontZoomIn) {
             listView.zoomInEditTextFontSize()
         } else if(menuItemProperty?.identifier == PDFViewMenuIdentifier_Edit_FontZoomOut) {
-            listView.zoomInEditTextFontSize()
+            listView.zoomOutEditTextFontSize()
         } else if(menuItemProperty?.identifier == PDFViewMenuIdentifier_Edit_FontColor) {
             let colorPanel = NSColorPanel.shared
             colorPanel.setTarget(self)
@@ -7485,10 +7465,10 @@ extension KMMainViewController: ComponentGroupDelegate {
             listView.rightRotateAction()
             rightSideController?.reloadEditingAreas()
         } else if(menuItemProperty?.identifier == PDFViewMenuIdentifier_Edit_HorizontalMirror) {
-            listView.reverseYAction()
+            listView.reverseXAction()
             rightSideController?.reloadEditingAreas()
         } else if(menuItemProperty?.identifier == PDFViewMenuIdentifier_Edit_VerticalMirror) {
-            listView.reverseXAction()
+            listView.reverseYAction()
             rightSideController?.reloadEditingAreas()
         } else if(menuItemProperty?.identifier == PDFViewMenuIdentifier_Edit_Crop) {
             listView.cropAction()

+ 1 - 0
PDF Office/PDF Master/KMClass/KMPDFViewController/KMNDisplayViewController/KMSplitPDFViewController/KMSplitPDFViewController.swift

@@ -64,6 +64,7 @@ class KMSplitPDFViewController: NSViewController {
         }
         pdfView?.frame = contendView.bounds
         pdfView?.delegate = self
+        pdfView?.isEnableEdit = false
         pdfView?.autoresizingMask = [.width, .height]
         contendView.addSubview(pdfView!, positioned: .below, relativeTo: splitToolbar)
         

+ 1 - 1
PDF Office/PDF Master/KMClass/Left/Bookmark/Controller/KMBookMarkViewController.swift

@@ -119,7 +119,7 @@ class KMBookMarkViewController: KMNBotaBaseViewController {
                 self.menuGroupView_?.frame = CGRectMake(0, 0, 180, viewHeight)
                 self.menuGroupView_?.updateGroupInfo(menuItemArr)
 
-                self.menuGroupView_?.showWithPoint(CGPoint(x: point.x, y: point.y - viewHeight), relativeTo: self.bookTableView)
+                self.menuGroupView_?.showWithPoint(CGPoint(x: point.x, y: point.y - viewHeight), relativeTo: nil)
 
                 return NSMenu()
             }