|
@@ -321,21 +321,7 @@ extension KMHomeViewController {
|
|
|
if preferenceNoteShow {
|
|
|
menuItemAction_newTagPageToNewWindow("")
|
|
|
} else {
|
|
|
- let window = NSWindow.currentWindow()
|
|
|
- if !KMDataManager.default.isTabbingWin{
|
|
|
- KMDataManager.default.isTabbingWin = true
|
|
|
- let tabbingWin: KMTabbingHintWindowController = KMTabbingHintWindowController()
|
|
|
- tabbingWin.selectCallBack = { continueOrNot in
|
|
|
- window.km_quick_endSheet()
|
|
|
- KMDataManager.default.isTabbingWin = false
|
|
|
- if continueOrNot {
|
|
|
- self.reopenDocument(forPaths: [])
|
|
|
- } else {
|
|
|
-
|
|
|
- }
|
|
|
- }
|
|
|
- window.km_beginSheet(windowC: tabbingWin)
|
|
|
- }
|
|
|
+ self.showLimitWindowAlert()
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -347,20 +333,18 @@ extension KMHomeViewController {
|
|
|
}
|
|
|
|
|
|
func showLimitWindowAlert() {
|
|
|
- let window = NSWindow.currentWindow()
|
|
|
if !KMDataManager.default.isTabbingWin{
|
|
|
KMDataManager.default.isTabbingWin = true
|
|
|
let tabbingWin: KMTabbingHintWindowController = KMTabbingHintWindowController()
|
|
|
- tabbingWin.selectCallBack = { continueOrNot in
|
|
|
- window.km_quick_endSheet()
|
|
|
+ tabbingWin.selectCallBack = {[weak self] continueOrNot in
|
|
|
KMDataManager.default.isTabbingWin = false
|
|
|
if continueOrNot {
|
|
|
- self.reopenDocument(forPaths: [])
|
|
|
+ self?.reopenDocument(forPaths: [])
|
|
|
} else {
|
|
|
|
|
|
}
|
|
|
}
|
|
|
- window.km_beginSheet(windowC: tabbingWin)
|
|
|
+ self.km_beginSheet(windowC: tabbingWin)
|
|
|
}
|
|
|
}
|
|
|
|