summaryrefslogtreecommitdiff
path: root/grapher/Models/AccelGUI.cs
diff options
context:
space:
mode:
authorJacob Palecki <[email protected]>2020-09-04 01:15:12 -0700
committerJacob Palecki <[email protected]>2020-09-04 01:15:12 -0700
commit87ee655d3c0ba3cdb0ca71a1b66aeb02c8c6aa70 (patch)
treea2ca5c42352737e3dab48ec854c1cd068a282e46 /grapher/Models/AccelGUI.cs
parentThe menus mostly work (diff)
parentMerge pull request #19 from JacobPalecki/gainOffset (diff)
downloadrawaccel-87ee655d3c0ba3cdb0ca71a1b66aeb02c8c6aa70.tar.xz
rawaccel-87ee655d3c0ba3cdb0ca71a1b66aeb02c8c6aa70.zip
Merge with master
Diffstat (limited to 'grapher/Models/AccelGUI.cs')
-rw-r--r--grapher/Models/AccelGUI.cs11
1 files changed, 9 insertions, 2 deletions
diff --git a/grapher/Models/AccelGUI.cs b/grapher/Models/AccelGUI.cs
index 3a15d48..e9e925f 100644
--- a/grapher/Models/AccelGUI.cs
+++ b/grapher/Models/AccelGUI.cs
@@ -78,7 +78,7 @@ namespace grapher
public void UpdateActiveSettingsFromFields()
{
- Settings.UpdateActiveSettings(new DriverSettings
+ var settings = new DriverSettings
{
rotation = Rotation.Field.Data,
sensitivity = new Vec2<double>
@@ -90,6 +90,14 @@ namespace grapher
modes = ApplyOptions.GetModes(),
args = ApplyOptions.GetArgs(),
minimumTime = .4
+ };
+
+ Settings.UpdateActiveSettings(settings, () =>
+ {
+ AccelForm.Invoke((MethodInvoker)delegate
+ {
+ UpdateGraph();
+ });
});
RefreshOnRead();
}
@@ -117,7 +125,6 @@ namespace grapher
Sensitivity.SetActiveValues(settings.sensitivity.x, settings.sensitivity.y);
Rotation.SetActiveValue(settings.rotation);
ApplyOptions.SetActiveValues(settings);
-
}
private void OnScaleMenuItemClick(object sender, EventArgs e)