Correct changedState in setWarningText() (#908)

When clearing warnings on blocks with IDs, the changedState variable should be true if the text changed. This will trigger the block being reshaped and remove the space for the notification icon (this.bumpNeighbours_).
This commit is contained in:
Jim Mussared
2017-02-07 03:41:17 +11:00
committed by Andrew n marshall
parent 1a1646a5c4
commit ec878b02cd

View File

@@ -1510,7 +1510,7 @@ Blockly.BlockSvg.prototype.setWarningText = function(text, opt_id) {
if (!newText) {
this.warning.dispose();
}
changedState = oldText == newText;
changedState = oldText != newText;
}
}
if (changedState && this.rendered) {