Corrections to warning bubbling.

This commit is contained in:
Neil Fraser
2015-07-20 11:54:03 -07:00
parent 0b1ff073e3
commit 98a76a62db
2 changed files with 5 additions and 5 deletions

View File

@@ -1251,12 +1251,12 @@ Blockly.BlockSvg.prototype.setWarningText = function(text, opt_id) {
}
// Bubble up through block's parents to add a warning on any collapsed block.
var parent = this.getParent();
var parent = this.getSurroundParent();
while (parent) {
if (parent.isCollapsed()) {
parent.setWarningText(text, this.id);
parent.setWarningText(text, 'collapsed ' + this.id + ' ' + id);
}
parent = parent.getParent();
parent = parent.getSurroundParent();
}
var changedState = false;