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

Reduce ID collisions. #2429

Merged
merged 3 commits into from
May 2, 2019
Merged

Reduce ID collisions. #2429

merged 3 commits into from
May 2, 2019

Conversation

NeilFraser
Copy link
Contributor

Realtime collaborators are liable to independently generate blocks with the same IDs due to the IDs being encoded in XML. This PR fixes IDs in toolboxes and IDs in cut/copy/paste.

Also included are a couple of other minor cleanup commits that result in no functional changes.

Matches code in Blockly Games.
No functional change.
Previously, if the XML of a toolbox contained a block ID, the first creation of this block would inherit this ID.  Thus two realtime collaborators could realistically end up with conflict.  Likewise, cut and paste could generate similar conflict.
I don’t care about whether we use the Element constants or the ubiquitously known 1 & 3 integers.  But we had a mix.
Also, ’x’ is usually used for horizontal location, ‘i’ is an iterator.
No functional change.
@NeilFraser NeilFraser merged commit 834fa64 into develop May 2, 2019
@NeilFraser NeilFraser deleted the fraser-hippopotamus branch May 2, 2019 16:56
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.

None yet

2 participants