Browse Source

综合-分享页面仅单选(已修复)

tangchao 1 year ago
parent
commit
1196e7cf01

BIN
PDF Office/PDF Office.xcodeproj/project.xcworkspace/xcuserdata/kdanmobile.xcuserdatad/UserInterfaceState.xcuserstate


+ 6 - 5
PDF Office/PDF Office/Class/PDFTools/PageEdit/Controller/KMPDFEditViewController.swift

@@ -1327,11 +1327,12 @@ extension KMPDFEditViewController : NSMenuDelegate,NSMenuItemValidation {
         item = menu.addItem(withTitle: NSLocalizedString("Print", comment: ""), action: #selector(printItemAction), target: self)
         item.representedObject = row
         
-        item = menu.addItem(withTitle: NSLocalizedString("Share", comment: ""), action: nil, target: self)
-        item.representedObject = row
-        
-        item.submenu = NSSharingServicePicker.menu(forSharingItems: [self.listView!.document.documentURL ?? ""], subjectContext: "", withTarget: self, selector: #selector(sharePageItemAction), serviceDelegate: nil)
-        
+        if (row.count <= 1) {
+            item = menu.addItem(withTitle: NSLocalizedString("Share", comment: ""), action: nil, target: self)
+            item.representedObject = row
+            
+            item.submenu = NSSharingServicePicker.menu(forSharingItems: [self.listView!.document.documentURL ?? ""], subjectContext: "", withTarget: self, selector: #selector(sharePageItemAction), serviceDelegate: nil)
+        }
     }
 }