I'm trying to reset the settings pane when the user reopens the settings window. To do this, I reinitialize SettingsWindowController and call show(), as shown below:
` settingController = SettingsWindowController(
panes: [
SettingTabs.shared.generalSettingView(),
SettingTabs.shared.settingAIPreferencesView(),
SettingTabs.shared.editorView(),
SettingTabs.shared.aboutSettingView()
],
animated: false,
hidesToolbarForSingleItem: true
)
settingController?.window?.identifier = NSUserInterfaceItemIdentifier.settingsWindow
settingController?.show()
`
However, this doesn't reset the pane—it always opens to the last selected tab. Even specifying a pane in show() doesn’t work.
Questions:
Is there a way to force a pane reset on reopen?
Can I completely deallocate the settings controller when the window is closed?
Would appreciate any insights!
I'm trying to reset the settings pane when the user reopens the settings window. To do this, I reinitialize SettingsWindowController and call show(), as shown below:
` settingController = SettingsWindowController(
panes: [
SettingTabs.shared.generalSettingView(),
SettingTabs.shared.settingAIPreferencesView(),
SettingTabs.shared.editorView(),
SettingTabs.shared.aboutSettingView()
],
animated: false,
hidesToolbarForSingleItem: true
)
settingController?.window?.identifier = NSUserInterfaceItemIdentifier.settingsWindow
settingController?.show()
`
However, this doesn't reset the pane—it always opens to the last selected tab. Even specifying a pane in show() doesn’t work.
Questions:
Is there a way to force a pane reset on reopen?
Can I completely deallocate the settings controller when the window is closed?
Would appreciate any insights!