浏览代码

【fix】快捷键关闭标签,兼容在有窗口弹起的场景

tangchao 7 月之前
父节点
当前提交
dca811c32f
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      PDF Office/PDF Master/AppDelegate.swift

+ 4 - 0
PDF Office/PDF Master/AppDelegate.swift

@@ -344,6 +344,10 @@ class AppDelegate: NSObject, NSApplicationDelegate, iRateDelegate{
             if browser.tabCount() == 1 {
                 windowControler?.window?.close()
             } else {
+                if let _ = windowControler?.window?.attachedSheet {
+                    NSSound.beep()
+                    return
+                }
                 browser.closeTab()
             }
         } else {