From ec878b02cde213687f2668127d43beb174d10606 Mon Sep 17 00:00:00 2001 From: Jim Mussared Date: Tue, 7 Feb 2017 03:41:17 +1100 Subject: [PATCH] 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_). --- core/block_svg.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/block_svg.js b/core/block_svg.js index 9c6cb90ae..4745b8d32 100644 --- a/core/block_svg.js +++ b/core/block_svg.js @@ -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) {