Skip to content

Commit

Permalink
🐛 Settings Reset
Browse files Browse the repository at this point in the history
  • Loading branch information
AigioL committed Nov 28, 2024
1 parent d5c87ef commit e96fcd5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,7 @@ public override void RaiseValueChanged(bool notSave = false)
public override void Reset(bool save = true)
{
var oldValue = value;
value = Default; // 赋值当前字段
setter(monitor.CurrentValue, default); // 赋值模型类属性
setter(monitor.CurrentValue, value = Default); // 赋值模型类属性

OnValueChanged(oldValue, value); // 调用变更事件

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,7 @@ public override void RaiseValueChanged(bool notSave = false)
public override void Reset(bool save = true)
{
var oldValue = value;
value = Default; // 赋值当前字段
SetModelValue(default); // 赋值模型类属性
SetModelValue(value = Default); // 赋值模型类属性

OnValueChanged(oldValue, value); // 调用变更事件

Expand Down

0 comments on commit e96fcd5

Please sign in to comment.