Disable commands to add a feed or add a folder if the window is already displaying a sheet. Fix #319.

This commit is contained in:
Brent Simmons
2018-02-03 10:56:12 -08:00
parent 9fce370967
commit e7ce12869c
3 changed files with 18 additions and 3 deletions

View File

@@ -18,6 +18,13 @@ class MainWindowController : NSWindowController, NSUserInterfaceValidations {
return isWindowLoaded && window!.isVisible
}
var isDisplayingSheet: Bool {
if let _ = window?.attachedSheet {
return true
}
return false
}
// MARK: NSWindowController
private let windowAutosaveName = NSWindow.FrameAutosaveName(rawValue: kWindowFrameKey)