Invalidates property values on ruleset config enable.

This commit is contained in:
2023-12-25 14:27:18 +08:00
parent 85bbe43827
commit 8bb2a01c8e
2 changed files with 11 additions and 0 deletions

View File

@@ -86,6 +86,9 @@ namespace Cryville.Crtr.Browsing.UI {
cat.SetActive(true);
}
void OnEnable() {
m_genericConfigPanel.InvalidatePropertyValues();
}
void OnDisable() {
if (_loaded) {
m_inputConfigPanel.SaveTo(_rscfg.inputs);

View File

@@ -47,5 +47,13 @@ namespace Cryville.Crtr.Config.UI {
_categories[category].Add(p);
}
}
public void InvalidatePropertyValues() {
foreach (var category in _categories) {
foreach (var property in category.Value) {
property.Invalidate();
}
}
}
}
}