Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions CodeEdit/Features/Documents/WorkspaceDocument.swift
Original file line number Diff line number Diff line change
Expand Up @@ -89,18 +89,16 @@ final class WorkspaceDocument: NSDocument, ObservableObject, NSToolbarDelegate {
// SwiftUI also ignores this value, so it just manages to set the initial window size. *Hopefully* this
// is fixed in the future.
// ----
if let rectString = getFromWorkspaceState(.workspaceWindowSize) as? String {
window.setContentSize(NSRectFromString(rectString).size)
}
let windowController = CodeEditWindowController(
window: window,
workspace: self,
taskNotificationHandler: taskNotificationHandler
)

if let rectString = getFromWorkspaceState(.workspaceWindowSize) as? String {
window.setFrameOrigin(NSRectFromString(rectString).origin)
window.setFrame(NSRectFromString(rectString), display: true, animate: false)
} else {
window.setFrame(NSRect(x: 0, y: 0, width: 1400, height: 900), display: true, animate: false)
window.center()
}
self.addWindowController(windowController)
Expand Down