fix(fx): flush pending field edits before persisting or signing - #513
Merged
Merged
Conversation
- Commit the proxy port and font size fields from one flushUiToViewModel() before every syncToOptions(): menu accelerators (Ctrl+S, Ctrl+T) and the window close request never fire focus loss, so #512 left those paths stale - File -> Exit persists the signing options, not only the view state - Reject out-of-range proxy ports and non-positive font sizes, trim whitespace - Seed the proxy port field from the view model, not from a literal in the FXML
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #512, which fixed the proxy port only for paths that move focus out of the field.
Shortcut+S,Shortcut+T) fire without changing the scene focus owner, andWINDOW_CLOSE_REQUESTruns before the stage hides, soonSign()/onTimestamp()/storeAndCleanup()still saw the last committed port. OneflushUiToViewModel()now commits the proxy port and font size fields (plus the placement rectangle) ahead of everysyncToOptions().File -> ExitcalledsaveViewStateToConfig()andstage.close();close()does not fireWINDOW_CLOSE_REQUEST, so Ctrl+Q dropped all signing options. It callsstoreAndCleanup()now.text="80"in TsaSettings.fxml.Tests: new
TsaSettingsControllerTest, one more case inSignatureSettingsControllerTest.mvn -pl jsignpdf -am testgreen (439).