Repo // Stop using didSet in cassettePath property.
- It doesn't work in some cases.
This commit is contained in:
parent
96e530fa01
commit
3ca7410316
|
@ -38,11 +38,7 @@ public class PrefMgr: PrefMgrProtocol {
|
||||||
public var checkUpdateAutomatically: Bool
|
public var checkUpdateAutomatically: Bool
|
||||||
|
|
||||||
@AppProperty(key: UserDef.kCassettePath.rawValue, defaultValue: "")
|
@AppProperty(key: UserDef.kCassettePath.rawValue, defaultValue: "")
|
||||||
public var cassettePath: String {
|
public var cassettePath: String
|
||||||
didSet {
|
|
||||||
LMMgr.loadCassetteData()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@AppProperty(key: UserDef.kUserDataFolderSpecified.rawValue, defaultValue: "")
|
@AppProperty(key: UserDef.kUserDataFolderSpecified.rawValue, defaultValue: "")
|
||||||
public var userDataFolderSpecified: String
|
public var userDataFolderSpecified: String
|
||||||
|
|
|
@ -76,6 +76,7 @@ struct VwrPrefPaneCassette: View {
|
||||||
guard let url = Self.dlgOpenFile.url else { return }
|
guard let url = Self.dlgOpenFile.url else { return }
|
||||||
if LMMgr.checkCassettePathValidity(url.path) {
|
if LMMgr.checkCassettePathValidity(url.path) {
|
||||||
PrefMgr.shared.cassettePath = url.path
|
PrefMgr.shared.cassettePath = url.path
|
||||||
|
LMMgr.loadCassetteData()
|
||||||
tbxCassettePath = PrefMgr.shared.cassettePath
|
tbxCassettePath = PrefMgr.shared.cassettePath
|
||||||
BookmarkManager.shared.saveBookmark(for: url)
|
BookmarkManager.shared.saveBookmark(for: url)
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -324,6 +324,7 @@ class CtlPrefWindow: NSWindowController {
|
||||||
guard let url = dlgOpenFile.url else { return }
|
guard let url = dlgOpenFile.url else { return }
|
||||||
if LMMgr.checkCassettePathValidity(url.path) {
|
if LMMgr.checkCassettePathValidity(url.path) {
|
||||||
PrefMgr.shared.cassettePath = url.path
|
PrefMgr.shared.cassettePath = url.path
|
||||||
|
LMMgr.loadCassetteData()
|
||||||
BookmarkManager.shared.saveBookmark(for: url)
|
BookmarkManager.shared.saveBookmark(for: url)
|
||||||
} else {
|
} else {
|
||||||
IMEApp.buzz()
|
IMEApp.buzz()
|
||||||
|
|
Loading…
Reference in New Issue