Skip to content

Fixed Skill Value Out-Of-Range Errors in Dialogs#6467

Merged
IllianiBird merged 1 commit into
MegaMek:masterfrom
IllianiBird:skillClampingInEditPerson
Mar 28, 2025
Merged

Fixed Skill Value Out-Of-Range Errors in Dialogs#6467
IllianiBird merged 1 commit into
MegaMek:masterfrom
IllianiBird:skillClampingInEditPerson

Conversation

@IllianiBird

Copy link
Copy Markdown
Collaborator
  • Added the clamp utility function to ensure skill levels and bonuses are constrained within valid ranges.
  • Updated CustomizePersonDialog and CreateCharacterDialog to use clamp for correcting invalid skill values modified by users.
  • Prevented issues with JSpinner components caused by out-of-range skill values.
  • Ensured consistent application of min/max constraints for skills (level: 0-10, bonus: -8 to 8).

Fix Sentry Report

- Added the `clamp` utility function to ensure skill levels and bonuses are constrained within valid ranges.
- Updated `CustomizePersonDialog` and `CreateCharacterDialog` to use `clamp` for correcting invalid skill values modified by users.
- Prevented issues with JSpinner components caused by out-of-range skill values.
- Ensured consistent application of min/max constraints for skills (level: 0-10, bonus: -8 to 8).
@IllianiBird IllianiBird added Bug Personnel Personnel-related Issues Severity: Medium Issues described as medium severity as per the new issue form labels Mar 28, 2025
@IllianiBird IllianiBird self-assigned this Mar 28, 2025
@codecov

codecov Bot commented Mar 28, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 11.28%. Comparing base (7ba01b2) to head (e409ea0).
Report is 23 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #6467      +/-   ##
============================================
- Coverage     11.28%   11.28%   -0.01%     
+ Complexity     6287     6285       -2     
============================================
  Files          1072     1072              
  Lines        136372   136400      +28     
  Branches      21088    21092       +4     
============================================
+ Hits          15394    15395       +1     
- Misses       119439   119468      +29     
+ Partials       1539     1537       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@IllianiBird IllianiBird merged commit 24fad4a into MegaMek:master Mar 28, 2025
@IllianiBird IllianiBird deleted the skillClampingInEditPerson branch March 31, 2025 03:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Personnel Personnel-related Issues Severity: Medium Issues described as medium severity as per the new issue form

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants