Skip to content

Commit 7b586a3

Browse files
authored
fix color setting in block maker -- procedures.js
1 parent cb1da99 commit 7b586a3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

blocks_vertical/procedures.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ Blockly.ScratchBlocks.ProcedureUtils.updateDisplay_ = function() {
165165
var wasRendered = this.rendered;
166166

167167
if (this.procCode_ === "") this.procCode_ = "unnamed block";
168-
// @todo add statement check?
168+
169169
var ConectionType = (this.outputType || (this.output_ ? 'string' : 'statement')).toLowerCase();
170170
this.rendered = false;
171171

@@ -217,6 +217,9 @@ Blockly.ScratchBlocks.ProcedureUtils.updateDisplay_ = function() {
217217

218218
this.rendered = wasRendered;
219219
if (wasRendered && !this.isInsertionMarker()) {
220+
if (this.type === "procedures_declaration") {
221+
for (var child of this.childBlocks_) child.updateColour();
222+
}
220223
this.initSvg();
221224
this.render();
222225
}

0 commit comments

Comments
 (0)