1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-06-29 00:29:34 +00:00

Ensures machine selection carries over sessions.

This commit is contained in:
Thomas Harte 2021-03-06 21:32:35 -05:00
parent eea4c1f148
commit 2f18f40697

View File

@ -56,6 +56,10 @@ class MachinePicker: NSObject {
func establishStoredOptions() {
let standardUserDefaults = UserDefaults.standard
// TEMPORARY: remove the Apple IIgs option. It's not yet a fully-working machine; no need to publicise it.
let appleIIgsTabIndex = machineSelectionTabs.indexOfTabViewItem(withIdentifier: "appleiigs")
machineSelectionTabs.removeTabViewItem(machineSelectionTabs.tabViewItem(at: appleIIgsTabIndex))
// Machine type
if let machineIdentifier = standardUserDefaults.string(forKey: "new.machine") {
// If I've changed my mind about visible tabs between versions, there may not be one that corresponds
@ -105,10 +109,6 @@ class MachinePicker: NSObject {
// ZX81
zx81MemorySizeButton.selectItem(withTag: standardUserDefaults.integer(forKey: "new.zx81MemorySize"))
// TEMPORARY: remove the Apple IIgs option. It's not yet a fully-working machine; no need to publicise it.
let appleIIgsTabIndex = machineSelectionTabs.indexOfTabViewItem(withIdentifier: "appleiigs")
machineSelectionTabs.removeTabViewItem(machineSelectionTabs.tabViewItem(at: appleIIgsTabIndex))
}
fileprivate func storeOptions() {