mirror of
https://github.com/scratchfoundation/scratch-blocks.git
synced 2025-08-28 22:10:31 -04:00
Fix grouping of disconnect and delete.
This commit is contained in:
parent
2ce0a25f92
commit
960b07daab
2 changed files with 4 additions and 0 deletions
|
@ -726,7 +726,9 @@ Blockly.BlockSvg.prototype.showContextMenu_ = function(e) {
|
|||
Blockly.Msg.DELETE_X_BLOCKS.replace('%1', String(descendantCount)),
|
||||
enabled: true,
|
||||
callback: function() {
|
||||
Blockly.Events.setGroup(true);
|
||||
block.dispose(true, true);
|
||||
Blockly.Events.setGroup(false);
|
||||
}
|
||||
};
|
||||
menuOptions.push(deleteOption);
|
||||
|
|
|
@ -268,6 +268,7 @@ Blockly.onKeyDown_ = function(e) {
|
|||
}
|
||||
if (deleteBlock) {
|
||||
// Common code for delete and cut.
|
||||
Blockly.Events.setGroup(true);
|
||||
Blockly.hideChaff();
|
||||
var heal = Blockly.dragMode_ != Blockly.DRAG_FREE;
|
||||
Blockly.selected.dispose(heal, true);
|
||||
|
@ -275,6 +276,7 @@ Blockly.onKeyDown_ = function(e) {
|
|||
Blockly.highlightedConnection_.unhighlight();
|
||||
Blockly.highlightedConnection_ = null;
|
||||
}
|
||||
Blockly.Events.setGroup(false);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue