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

CATROID-1056 Fix wrong variable references after undo #4143

Merged
merged 1 commit into from
Apr 23, 2021

Conversation

mstoeg
Copy link
Contributor

@mstoeg mstoeg commented Apr 22, 2021

https://jira.catrob.at/browse/CATROID-1056

When loading the old values of the variables after an undo a deep copy of all the uservariables was restored. This leads to the problem that there are now two instances of the same uservariable (one in the uservariable list of the project and one that is actually stored within the bricks). In order to fix this after performing an undo the uservariables are not copied in a deep manner but just the values are restored (so that the references do not change).

Additionally changed the test FormulaEditorUndoTest to also check if the uservariable references stay the same after an undo.

Your checklist for this pull request

Please review the contributing guidelines and wiki pages of this repository.

  • Include the name of the Jira ticket in the PR’s title
  • Include a summary of the changes plus the relevant context
  • Choose the proper base branch (develop)
  • Confirm that the changes follow the project’s coding guidelines
  • Verify that the changes generate no compiler or linter warnings
  • Perform a self-review of the changes
  • Verify to commit no other files than the intentionally changed ones
  • Include reasonable and readable tests verifying the added or changed behavior
  • Confirm that new and existing unit tests pass locally
  • Check that the commits’ message style matches the project’s guideline
  • Stick to the project’s gitflow workflow
  • Verify that your changes do not have any conflicts with the base branch
  • After the PR, verify that all CI checks have passed
  • Post a message in the catroid-stage or catroid-ide Slack channel and ask for a code reviewer

@mstoeg mstoeg requested a review from dandrawes April 22, 2021 13:03
@mstoeg mstoeg force-pushed the CATROID-1056 branch 5 times, most recently from 83b7897 to 46f369b Compare April 23, 2021 08:08
Copy link
Contributor

@dandrawes dandrawes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in PP!

@wslany wslany merged commit 2479443 into Catrobat:develop Apr 23, 2021
@wslany
Copy link
Member

wslany commented Apr 23, 2021

Thanks!!

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.

3 participants