PrefUI // Fix the methods for resetting paths.

This commit is contained in:
ShikiSuen 2023-07-29 23:35:24 +08:00
parent 100a16a9e6
commit 45232ca499
2 changed files with 6 additions and 7 deletions

View File

@ -80,13 +80,13 @@ struct VwrPrefPaneCassette: View {
} else { } else {
IMEApp.buzz() IMEApp.buzz()
if !bolPreviousPathValidity { if !bolPreviousPathValidity {
LMMgr.resetCassettePath() cassettePath = ""
} }
return return
} }
} else { } else {
if !bolPreviousPathValidity { if !bolPreviousPathValidity {
LMMgr.resetCassettePath() cassettePath = ""
} }
return return
} }
@ -96,7 +96,7 @@ struct VwrPrefPaneCassette: View {
Text("...") Text("...")
} }
Button { Button {
LMMgr.resetCassettePath() cassettePath = ""
} label: { } label: {
Text("×") Text("×")
} }

View File

@ -96,13 +96,13 @@ struct VwrPrefPaneDictionary: View {
} else { } else {
IMEApp.buzz() IMEApp.buzz()
if !bolPreviousFolderValidity { if !bolPreviousFolderValidity {
LMMgr.resetSpecifiedUserDataFolder() userDataFolderSpecified = LMMgr.dataFolderPath(isDefaultFolder: true)
} }
return return
} }
} else { } else {
if !bolPreviousFolderValidity { if !bolPreviousFolderValidity {
LMMgr.resetSpecifiedUserDataFolder() userDataFolderSpecified = LMMgr.dataFolderPath(isDefaultFolder: true)
} }
return return
} }
@ -112,8 +112,7 @@ struct VwrPrefPaneDictionary: View {
Text("...") Text("...")
} }
Button { Button {
userDataFolderSpecified = "" userDataFolderSpecified = LMMgr.dataFolderPath(isDefaultFolder: true)
LMMgr.resetSpecifiedUserDataFolder()
} label: { } label: {
Text("") Text("")
} }