diff --git a/src/blocks/mrc_call_python_function.ts b/src/blocks/mrc_call_python_function.ts index 33da9e08..c5804d66 100644 --- a/src/blocks/mrc_call_python_function.ts +++ b/src/blocks/mrc_call_python_function.ts @@ -705,6 +705,7 @@ const CALL_PYTHON_FUNCTION = { // Add a warnings to the block. const warningText = warnings.join('\n\n'); this.setWarningText(warningText, WARNING_ID_FUNCTION_CHANGED); + this.getIcon(Blockly.icons.IconType.WARNING)!.setBubbleVisible(true); this.bringToFront(); } else { // Clear the existing warning on the block. diff --git a/src/blocks/mrc_event.ts b/src/blocks/mrc_event.ts index 4e662322..0a6d6172 100644 --- a/src/blocks/mrc_event.ts +++ b/src/blocks/mrc_event.ts @@ -207,6 +207,7 @@ const EVENT = { // If we end up here it shouldn't be allowed block.unplug(true); blockBlock.setWarningText('Events can only go in the events section of the robot or mechanism'); + blockBlock.getIcon(Blockly.icons.IconType.WARNING)!.setBubbleVisible(true); } }, getEvent: function (this: EventBlock): commonStorage.Event { diff --git a/src/blocks/mrc_event_handler.ts b/src/blocks/mrc_event_handler.ts index 99905ad5..e1639802 100644 --- a/src/blocks/mrc_event_handler.ts +++ b/src/blocks/mrc_event_handler.ts @@ -204,6 +204,7 @@ const EVENT_HANDLER = { // Add a warnings to the block. const warningText = warnings.join('\n\n'); this.setWarningText(warningText, WARNING_ID_EVENT_CHANGED); + this.getIcon(Blockly.icons.IconType.WARNING)!.setBubbleVisible(true); this.bringToFront(); } else { // Clear the existing warning on the block. diff --git a/src/blocks/mrc_get_parameter.ts b/src/blocks/mrc_get_parameter.ts index 248ce00c..32b30b58 100644 --- a/src/blocks/mrc_get_parameter.ts +++ b/src/blocks/mrc_get_parameter.ts @@ -90,6 +90,7 @@ const GET_PARAMETER_BLOCK = { // If we end up here it shouldn't be allowed block.unplug(true); blockBlock.setWarningText(Blockly.Msg.PARAMETERS_CAN_ONLY_GO_IN_THEIR_METHODS_BLOCK); + blockBlock.getIcon(Blockly.icons.IconType.WARNING)!.setBubbleVisible(true); } }, }; diff --git a/src/blocks/mrc_mechanism.ts b/src/blocks/mrc_mechanism.ts index 90e77f80..c6cde2a3 100644 --- a/src/blocks/mrc_mechanism.ts +++ b/src/blocks/mrc_mechanism.ts @@ -210,6 +210,7 @@ const MECHANISM = { // Add a warnings to the block. const warningText = warnings.join('\n\n'); this.setWarningText(warningText, WARNING_ID_MECHANISM_CHANGED); + this.getIcon(Blockly.icons.IconType.WARNING)!.setBubbleVisible(true); this.bringToFront(); } else { // Clear the existing warning on the block.