You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Kräfte: dismissing the Stärke-correction flyout leaves uncommitted values in the grid row #651
The Stärke-correction flyout in Kräfte binds its TextBoxes straight to the row's counts (ForcesView.axaml:297-320, e.g. Text="{Binding ZugfuehrerCount}"). Only ÜBERNEHMEN writes to the session. Dismissing the flyout — a click outside, Esc — leaves the typed values in the grid row, while the session and the header total keep the old ones. The row only re-syncs when the stored Stärke changes (ForcesViewModel.cs:110-113):
So the screen shows a Stärke that was never recorded, and the header total disagrees with the row. During an Einsatz the Lagebuchführer reads the row, not the session, and reports the wrong number.
Expected
Closing the flyout without ÜBERNEHMEN puts the row's four counts back to the stored Stärke.
Shape: a ForceRow.RevertStrength() in the view model (restores from _syncedStrength), called from the flyout's Closed event in ForcesView.axaml.cs, next to OnHistoryFlyoutOpened. The decision stays in the view model.
Notes
Bug fix: write the failing test first — edit a count, revert without committing, assert the row equals the session's Stärke.
This touches the UI, so the PR needs a before/after screenshot pair.
Activity
fix(kraefte): put the stored Stärke back when the correction flyout i…