Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert loaded settings numbers to double #592

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions lib/pages/home_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -535,15 +535,21 @@
.toList() ??
Defaults.autoFolders);
widget.prefs.setDouble(PrefsKeys.defaultMaxVel,
json[PrefsKeys.defaultMaxVel] ?? Defaults.defaultMaxVel);
widget.prefs.setDouble(PrefsKeys.defaultMaxAccel,
json[PrefsKeys.defaultMaxAccel] ?? Defaults.defaultMaxAccel);
widget.prefs.setDouble(PrefsKeys.defaultMaxAngVel,
json[PrefsKeys.defaultMaxAngVel] ?? Defaults.defaultMaxAngVel);
widget.prefs.setDouble(PrefsKeys.defaultMaxAngAccel,
json[PrefsKeys.defaultMaxAngAccel] ?? Defaults.defaultMaxAngAccel);
json[PrefsKeys.defaultMaxVel]?.toDouble() ?? Defaults.defaultMaxVel);
widget.prefs.setDouble(

Check warning on line 539 in lib/pages/home_page.dart

View check run for this annotation

Codecov / codecov/patch

lib/pages/home_page.dart#L538-L539

Added lines #L538 - L539 were not covered by tests
PrefsKeys.defaultMaxAccel,
json[PrefsKeys.defaultMaxAccel]?.toDouble() ??

Check warning on line 541 in lib/pages/home_page.dart

View check run for this annotation

Codecov / codecov/patch

lib/pages/home_page.dart#L541

Added line #L541 was not covered by tests
Defaults.defaultMaxAccel);
widget.prefs.setDouble(

Check warning on line 543 in lib/pages/home_page.dart

View check run for this annotation

Codecov / codecov/patch

lib/pages/home_page.dart#L543

Added line #L543 was not covered by tests
PrefsKeys.defaultMaxAngVel,
json[PrefsKeys.defaultMaxAngVel]?.toDouble() ??

Check warning on line 545 in lib/pages/home_page.dart

View check run for this annotation

Codecov / codecov/patch

lib/pages/home_page.dart#L545

Added line #L545 was not covered by tests
Defaults.defaultMaxAngVel);
widget.prefs.setDouble(

Check warning on line 547 in lib/pages/home_page.dart

View check run for this annotation

Codecov / codecov/patch

lib/pages/home_page.dart#L547

Added line #L547 was not covered by tests
PrefsKeys.defaultMaxAngAccel,
json[PrefsKeys.defaultMaxAngAccel]?.toDouble() ??

Check warning on line 549 in lib/pages/home_page.dart

View check run for this annotation

Codecov / codecov/patch

lib/pages/home_page.dart#L549

Added line #L549 was not covered by tests
Defaults.defaultMaxAngAccel);
widget.prefs.setDouble(PrefsKeys.maxModuleSpeed,
json[PrefsKeys.maxModuleSpeed] ?? Defaults.maxModuleSpeed);
json[PrefsKeys.maxModuleSpeed]?.toDouble() ?? Defaults.maxModuleSpeed);

Check warning on line 552 in lib/pages/home_page.dart

View check run for this annotation

Codecov / codecov/patch

lib/pages/home_page.dart#L552

Added line #L552 was not covered by tests
}

void _saveProjectSettingsToFile(Directory projectDir) {
Expand Down
Loading