-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
fix: Don't clober event group when renaming vars #6829
Conversation
Also audit all existing event group commands and tweak a few of them where I think there's a potential issue.
core/contextmenu_items.ts
Outdated
@@ -279,7 +278,8 @@ export function registerDeleteAll() { | |||
} | |||
scope.workspace.cancelCurrentGesture(); | |||
const deletableBlocks = getDeletableBlocks_(scope.workspace); | |||
const eventGroup = idGenerator.genUid(); | |||
eventUtils.setGroup(true); |
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.
If the user chooses cancel on the dialog, deleteNext_ is never run and grouping is never turned off. deleteNext_ was already calling setGroup() with the passed-in ID - why is this change necessary?
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.
This changes eliminates the dependency on idGenerator. It also means that in Blockly there would be only one place which sets eventGroup -- so if we change the group format in the future, we won't need to change it in two places.
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.
Got it, that makes sense; I think the issue about grouping never being turned back off if the user chooses Cancel on the confirmation dialog still stands though.
Does this also address #1534? |
Also audit all existing event group commands and tweak a few of them where I think there's a potential issue.
See https://groups.google.com/g/blockly/c/dKizQbKb8vo