Move the isOpen property from specific window controllers to the NSWindowController extension in RSCore.
This commit is contained in:
parent
9d39ae2de4
commit
2325e7edbc
|
@ -32,10 +32,6 @@ final class InspectorWindowController: NSWindowController {
|
|||
}
|
||||
}
|
||||
|
||||
var isOpen: Bool {
|
||||
return isWindowLoaded && window!.isVisible
|
||||
}
|
||||
|
||||
private var inspectors: [InspectorViewController]!
|
||||
|
||||
private var currentInspector: InspectorViewController! {
|
||||
|
|
|
@ -16,10 +16,6 @@ private let kWindowFrameKey = "MainWindow"
|
|||
|
||||
class MainWindowController : NSWindowController, NSUserInterfaceValidations {
|
||||
|
||||
var isOpen: Bool {
|
||||
return isWindowLoaded && window!.isVisible
|
||||
}
|
||||
|
||||
// MARK: NSWindowController
|
||||
|
||||
private let windowAutosaveName = NSWindow.FrameAutosaveName(rawValue: kWindowFrameKey)
|
||||
|
|
|
@ -14,4 +14,9 @@ public extension NSWindowController {
|
|||
|
||||
return window?.isDisplayingSheet ?? false
|
||||
}
|
||||
|
||||
public var isOpen: Bool {
|
||||
|
||||
return isWindowLoaded && window!.isVisible
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue