Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/blocks/mrc_call_python_function.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions src/blocks/mrc_event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions src/blocks/mrc_event_handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions src/blocks/mrc_get_parameter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
},
};
Expand Down
1 change: 1 addition & 0 deletions src/blocks/mrc_mechanism.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down