You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you change token selection to a single new unselected token by clicking on the token using the mouse left-hand button, the onChangeSelection event gets triggered twice: once on mouse left-hand button down and again on either mouse left-hand button up or mouse drag.
To Reproduce
Create a blank campaign.
Create some tokens, one being a lib token.
Add the following macro to the lib token and run it:
Try selecting tokens as described in the bug description.
Observe the triggering twice issue where the message is broadcasted on mouse down, and again on mouse up or mouse drag.
Expected Behaviour
onChangeSelection should only get fired the once in this scenario.
Screenshots
MapTool Info
1.15.2
Desktop
Windows 11
Additional Context
The name of the onChangeSelection event is a bit misleading, however the wiki does state that the event is fired when a token is selected (rather than when the token selection is actually changed!).
e.g. if you left mouse click on a single token that is also the sole currently selected token, onChangeSelection will also be triggered on left mouse up (i.e. unnecessarily as the selection has not effectively changed). Right mouse click on an already selected token does not trigger it. Similarly if no tokens are selected. and you left click somewhere else on the map (that is not a token), onChangeSelection is triggered but again the token selection has not effectively changed.
The text was updated successfully, but these errors were encountered:
This is a documented issue with the onChangeSelection event, which may be called more than once on a change of selection and macro, so this needs to be taken into account. Or at least it used to be documented, but sometimes these warnings get removed from the Wiki. This is due to some internal tomfoolery that happens with how selection works and is never likely to be fixed for the current events
Describe the Bug
If you change token selection to a single new unselected token by clicking on the token using the mouse left-hand button, the onChangeSelection event gets triggered twice: once on mouse left-hand button down and again on either mouse left-hand button up or mouse drag.
To Reproduce
Expected Behaviour
onChangeSelection should only get fired the once in this scenario.
Screenshots
MapTool Info
1.15.2
Desktop
Windows 11
Additional Context
The name of the onChangeSelection event is a bit misleading, however the wiki does state that the event is fired when a token is selected (rather than when the token selection is actually changed!).
e.g. if you left mouse click on a single token that is also the sole currently selected token, onChangeSelection will also be triggered on left mouse up (i.e. unnecessarily as the selection has not effectively changed). Right mouse click on an already selected token does not trigger it. Similarly if no tokens are selected. and you left click somewhere else on the map (that is not a token), onChangeSelection is triggered but again the token selection has not effectively changed.
The text was updated successfully, but these errors were encountered: