-
-
Notifications
You must be signed in to change notification settings - Fork 216
Do not perform diagram updates outside of a transaction #3205
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
Merged
Conversation
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
3 tasks
f723985
to
10e0feb
Compare
Not in the update function anymore.
`update_now()` is part if the protocol that Gaphas views use to communicate with the model (`Diagram`). By decoupling those we can move away from a model where diagram updates are done asynchronously. We need our updates to happen within the context of a transaction. A possitive side effect may be that tearing, when moveing something in a diagram, is a thing of the past.
This ensures that all updates happen within the context of a transaction.
10e0feb
to
22ba98b
Compare
8d05b3c
to
659126a
Compare
danyeaw
approved these changes
Mar 24, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @amolenaar, this is a nice fix!
This was referenced Mar 24, 2024
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.
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Spontaneous errors could occur if a diagram was updated. This was because the update happened from within the idle handler of the diagram-view widget.
Some items on a diagram did updates that caused handle positions or the position (matrix) to change.
Issue Number: Fixes #3203. It may also be a fix for #3069.
What is the new behavior?
Updates do no longer happen from the view. Instead, the application should in time update the diagram state.
Does this PR introduce a breaking change?
Other information