Commit bd9758c1 authored by Evan W. Patton's avatar Evan W. Patton

Defer update of warning indicator until workspace rendered

Warning indicator counters were 0 even if there were warnings in the
workspace. This was due to a combination of optimizations where the
warnings aren't computed if the workspace isn't rendered and the
indicator isn't created until the first rendering pass. This means
that when the indicator is rendered it has not been updated with the
results of any error checking passes have been made.

Fixes #953

Change-Id: I5641c6444efeab9228efca5a74a78ed3a4577484
parent 2d6e2394
......@@ -570,12 +570,14 @@ public class BlocklyPanel extends HTMLPanel {
block.rename(e.oldValue, e.newValue);
}
cb(e);
// [lyn 12/31/2013] Check for duplicate component event handlers before
// running any error handlers to avoid quadratic time behavior.
var handler = this.getWarningHandler();
if (handler) {
handler.determineDuplicateComponentEventHandlers();
this.requestErrorChecking(block);
if (workspace.rendered) {
var handler = this.getWarningHandler();
if (handler) {
// [lyn 12/31/2013] Check for duplicate component event handlers before
// running any error handlers to avoid quadratic time behavior.
handler.determineDuplicateComponentEventHandlers();
this.requestErrorChecking(block);
}
}
}.bind(workspace));
this.@com.google.appinventor.client.editor.youngandroid.BlocklyPanel::workspace = workspace;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment