Commit 001fa913 authored by Evan W. Patton's avatar Evan W. Patton Committed by Susan Rati Lane

Fix procedure names not set in backpack

Change-Id: Ibc7be86b92f0072f77187ffcda6d8ba0c035bb6d
parent d616b161
...@@ -33,12 +33,12 @@ goog.inherits(AI.Blockly.FieldProcedureName, Blockly.FieldTextInput); ...@@ -33,12 +33,12 @@ goog.inherits(AI.Blockly.FieldProcedureName, Blockly.FieldTextInput);
* @override * @override
*/ */
AI.Blockly.FieldProcedureName.prototype.setValue = function(newValue) { AI.Blockly.FieldProcedureName.prototype.setValue = function(newValue) {
var oldValue = this.getValue();
AI.Blockly.FieldProcedureName.superClass_.setValue.call(this, newValue);
if (this.sourceBlock_ && this.sourceBlock_.isInFlyout) { if (this.sourceBlock_ && this.sourceBlock_.isInFlyout) {
// Do not take action for blocks in flyouts // Do not take action for blocks in flyouts
return; return;
} }
var oldValue = this.getValue();
AI.Blockly.FieldProcedureName.superClass_.setValue.call(this, newValue);
newValue = this.getValue(); newValue = this.getValue();
if (typeof newValue === 'string' && this.sourceBlock_) { if (typeof newValue === 'string' && this.sourceBlock_) {
var procDb = this.sourceBlock_.workspace.getProcedureDatabase(); var procDb = this.sourceBlock_.workspace.getProcedureDatabase();
......
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