mirror of
https://github.com/google/blockly.git
synced 2026-01-09 18:10:08 +01:00
Fix nested disabled blocks in disableOrphans.
This commit is contained in:
@@ -802,10 +802,10 @@ Blockly.Events.disableOrphans = function(event) {
|
||||
var block = workspace.getBlockById(event.blockId);
|
||||
if (block) {
|
||||
if (block.getParent() && !block.getParent().disabled) {
|
||||
do {
|
||||
block.setDisabled(false);
|
||||
block = block.getNextBlock();
|
||||
} while (block);
|
||||
var children = block.getDescendants();
|
||||
for (var i = 0, child; child = children[i]; i++) {
|
||||
child.setDisabled(false);
|
||||
}
|
||||
} else if ((block.outputConnection || block.previousConnection) &&
|
||||
Blockly.dragMode_ == Blockly.DRAG_NONE) {
|
||||
do {
|
||||
|
||||
Reference in New Issue
Block a user