File tree Expand file tree Collapse file tree 5 files changed +5
-0
lines changed
Expand file tree Collapse file tree 5 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -705,6 +705,7 @@ const CALL_PYTHON_FUNCTION = {
705705 // Add a warnings to the block.
706706 const warningText = warnings . join ( '\n\n' ) ;
707707 this . setWarningText ( warningText , WARNING_ID_FUNCTION_CHANGED ) ;
708+ this . getIcon ( Blockly . icons . IconType . WARNING ) . setBubbleVisible ( true ) ;
708709 this . bringToFront ( ) ;
709710 } else {
710711 // Clear the existing warning on the block.
Original file line number Diff line number Diff line change @@ -207,6 +207,7 @@ const EVENT = {
207207 // If we end up here it shouldn't be allowed
208208 block . unplug ( true ) ;
209209 blockBlock . setWarningText ( 'Events can only go in the events section of the robot or mechanism' ) ;
210+ blockBlock . getIcon ( Blockly . icons . IconType . WARNING ) . setBubbleVisible ( true ) ;
210211 }
211212 } ,
212213 getEvent : function ( this : EventBlock ) : commonStorage . Event {
Original file line number Diff line number Diff line change @@ -204,6 +204,7 @@ const EVENT_HANDLER = {
204204 // Add a warnings to the block.
205205 const warningText = warnings . join ( '\n\n' ) ;
206206 this . setWarningText ( warningText , WARNING_ID_EVENT_CHANGED ) ;
207+ this . getIcon ( Blockly . icons . IconType . WARNING ) . setBubbleVisible ( true ) ;
207208 this . bringToFront ( ) ;
208209 } else {
209210 // Clear the existing warning on the block.
Original file line number Diff line number Diff line change @@ -90,6 +90,7 @@ const GET_PARAMETER_BLOCK = {
9090 // If we end up here it shouldn't be allowed
9191 block . unplug ( true ) ;
9292 blockBlock . setWarningText ( Blockly . Msg . PARAMETERS_CAN_ONLY_GO_IN_THEIR_METHODS_BLOCK ) ;
93+ blockBlock . getIcon ( Blockly . icons . IconType . WARNING ) . setBubbleVisible ( true ) ;
9394 }
9495 } ,
9596} ;
Original file line number Diff line number Diff line change @@ -210,6 +210,7 @@ const MECHANISM = {
210210 // Add a warnings to the block.
211211 const warningText = warnings . join ( '\n\n' ) ;
212212 this . setWarningText ( warningText , WARNING_ID_MECHANISM_CHANGED ) ;
213+ this . getIcon ( Blockly . icons . IconType . WARNING ) . setBubbleVisible ( true ) ;
213214 this . bringToFront ( ) ;
214215 } else {
215216 // Clear the existing warning on the block.
You can’t perform that action at this time.
0 commit comments