Skip to content

Commit

Permalink
fix - motivity not set from input
Browse files Browse the repository at this point in the history
  • Loading branch information
a1xd committed Sep 23, 2021
1 parent 6d63eee commit 8bfee40
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions grapher/Models/Options/AccelTypeOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ public void SetActiveValues(ref AccelArgs args)
GrowthRate.SetActiveValue(args.growthRate);
Smooth.SetActiveValue(args.smooth);
Scale.SetActiveValue(args.scale);
Limit.SetActiveValue(args.limit);
Limit.SetActiveValue((args.mode == AccelMode.motivity) ? args.motivity : args.limit);
PowerClassic.SetActiveValue(args.power);
Exponent.SetActiveValue(args.exponent);
Midpoint.SetActiveValue(args.midpoint);
Expand Down Expand Up @@ -319,7 +319,17 @@ public void SetArgs(ref AccelArgs args)
if (Smooth.Visible) args.smooth = Smooth.Field.Data;
if (Scale.Visible) args.scale = Scale.Field.Data;
if (Cap.Visible) args.cap = Cap.Field.Data;
if (Limit.Visible) args.limit = Limit.Field.Data;
if (Limit.Visible)
{
if (args.mode == AccelMode.motivity)
{
args.motivity = Limit.Field.Data;
}
else
{
args.limit = Limit.Field.Data;
}
}
if (PowerClassic.Visible) args.power = PowerClassic.Field.Data;
if (Exponent.Visible)args.exponent = Exponent.Field.Data;
if (Offset.Visible) args.offset = Offset.Field.Data;
Expand Down

0 comments on commit 8bfee40

Please sign in to comment.