Force value changed and invalidate implementation in property adapter.

This commit is contained in:
2023-12-25 14:21:37 +08:00
parent c66b7da63b
commit a532a9f4c1
2 changed files with 8 additions and 5 deletions

View File

@@ -30,7 +30,7 @@ namespace Cryville.Crtr.Config {
public void SetValue(string key, object value) {
_store[key] = value;
foreach (var prop in _props) {
prop.OnValueChanged();
prop.Invalidate();
}
}
}
@@ -79,9 +79,8 @@ namespace Cryville.Crtr.Config {
}
public event Action ValueChanged;
public void OnValueChanged() {
var ev = ValueChanged;
if (ev != null) ev();
public void Invalidate() {
ValueChanged?.Invoke();
}
public bool SetMapped { get { return false; } }