BUG: Removing an event from a custom widget later will block any variables which might be used by any previously attached triggers in an app

I just stumbled across the following:

Say you have created a custom widget. This widget is setup with two events that are somehow fired when the widget does its thing.

Now this widget is used in an app and trigger functions are assigned to each event. As part of these trigger functions certain variables are used, e.g. somehow manipulated.

Now imagine that for whatever reason during development it is decided that one of the events of the custom widget is no longer valid or needed. So this event is removed and the widget is saved.

When you then open the app which uses this widget you will see that as expected in this case the event which has been removed from the widget is also no longer displayed. In principle, this is what we want.

However, if you then check the variable window, you will notice that the variables which have been used by the trigger event, which is no longer there in the widget, is still marked as blocked and its usage indicator will also still link to the custom widget when clicking on it. When you do so, the Tulip editor will tell you there was an “Error”.