Remove unneeded window layout call. Change placement of initial inspector origin.

This commit is contained in:
Brent Simmons 2018-01-21 13:11:09 -08:00
parent c692d357d2
commit a7a2eabf78
1 changed files with 3 additions and 4 deletions

View File

@ -65,7 +65,7 @@ final class InspectorWindowController: NSWindowController {
inspectors = [feedInspector, folderInspector, builtinSmartFeedInspector, nothingInspector] inspectors = [feedInspector, folderInspector, builtinSmartFeedInspector, nothingInspector]
currentInspector = nothingInspector currentInspector = nothingInspector
window?.flippedOrigin = NSPoint(x: 128, y: 128) window?.flippedOrigin = NSPoint(x: 256, y: 256)
} }
func inspector(for objects: [Any]?) -> InspectorViewController { func inspector(for objects: [Any]?) -> InspectorViewController {
@ -100,9 +100,8 @@ private extension InspectorWindowController {
let flippedOrigin = window.flippedOrigin let flippedOrigin = window.flippedOrigin
window.contentViewController = inspector window.contentViewController = inspector
window.layoutIfNeeded() if let flippedOrigin = flippedOrigin {
if let origin = flippedOrigin { window.setFlippedOriginAdjustingForScreen(flippedOrigin)
window.setFlippedOriginAdjustingForScreen(origin)
} }
} }
} }