Navigation Menu

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

Batch updates to undo history #310

Merged
merged 4 commits into from Jun 7, 2020
Merged

Batch updates to undo history #310

merged 4 commits into from Jun 7, 2020

Conversation

MarkMpn
Copy link
Collaborator

@MarkMpn MarkMpn commented Jun 6, 2020

  • Implement ISupportsInitializeNotification interface in base control. While control is being initialized, no changes (being triggered by the control being populated) trigger a call to Save and so do not appear in the undo history
  • A similar process using the Initializing field was already added to reduce flicker on the conditionControl, so moved this to use the ISupportsInitializeNotification mechanism for consistency
  • Also use BeginInit / EndInit to batch multiple changes being made by selecting a relationship so this appears only once
  • Added property to SaveEventArgs to indicate if change is being triggered by a keypress event or not. Keypress-generated events are ignored from undo history
  • Add & remove event handlers as necessary so Save event is still triggered on each keypress to update the rest of the UI but adds an extra event handler to Validated event to trigger an extra Save call when the user finishes editing the field so it can be added to undo history.

@MarkMpn MarkMpn linked an issue Jun 6, 2020 that may be closed by this pull request
@rappen rappen merged commit a89a9a9 into rappen:master Jun 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

History records every key stroke
2 participants