Fix nested disabled blocks in disableOrphans.

This commit is contained in:
Neil Fraser
2016-07-15 16:28:39 -07:00
parent a76635d352
commit 5852f8e7e1

View File

@@ -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 {