1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-12-26 09:29:45 +00:00

Merge pull request #875 from TomHarte/InitialSelection

Ensures machine selection carries over sessions.
This commit is contained in:
Thomas Harte 2021-03-06 21:38:41 -05:00 committed by GitHub
commit 62949d2f8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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() {