Reset mouse.Icon to "" when a plugin is deactivated

I wanted to use a custom icon for a plugin I was quickly writing up. This icon to be exact:

. However, I want that icon to go away and the mouse to revert to its normal self when the plugin is deselected. Currently, there’s no way to do that since after .Deactivation was fired (well, even if it only when it was supposed to and not when the plugin was selected / a different button in the same plugin was selected) the mouse is set to nil so it’s impossible to change the icon back. AFAIK there’s no reason for the plugin mouse to retain the icon of a no longer active plugin, so when a plugin is truly deactivated the mouse icon should revert to “”.

In the meantime, if anyone knows of any workarounds that I can use to set the mouse icon to invisible when the plugin is deactivated, that’d be great.

2 Likes