google / blockly

The web-based visual programming editor.
https://developers.google.com/blockly/
Apache License 2.0
12.52k stars 3.72k forks source link

fix: display the correct variable reference count when deleting a variable. #8549

Closed gonfunko closed 3 months ago

gonfunko commented 3 months ago

The basics

The details

When deleting a variable with one or more references in the workspace from the dropdown/contextual menu of the variable blocks in a non-autoclosing flyout, the number of references in the prompt confirming the deletion was off by one. This PR fixes this by not including the block triggering the deletion (in the flyout) in the reference count.