The code was incorrectly calculating the size of cue-widgets on a page.
This is observable by:
Create a new showfile using the Cart Layout.
Create a cue (any type) and place it in the bottom-right of the tab page.
Right-click somewhere in the lower-right quadrant of the cue-widget.
Close the resulting context menu.
Right click somewhere around or on the coloured dot in the top left of the cue-widget.
Observe the application crash to desktop
Why? After calculating the correct width and height, the code was then adding the value of the variable space (six pixels on my system) to both calculated dimensions. As the cue-widgets are placed further and further away from position (0, 0), there is an ever-increasing margin where the top and left sides of a cue-widget are resolved by the indexAt method to be either the cue-widget to the left or above the one the cursor is actually over.
With the default 7x5 grid, the bottom-left most cue has a 42-pixel wide margin along its left side and a 30-pixel-high margin along its top side where the indexAt returns the grid id of the cue either to the left or above it.
In the case that there is an actual cue to the left or above, then the user gets the context menu for that cue instead of the one underneath the cursor.
In the above case where there is no cue either to the left or above the cue, NoneType instead of a cue-widget is found at the calculated grid-reference, causing a fatal error when this NoneType is then asked for a property it does not possess.
The code was incorrectly calculating the size of cue-widgets on a page.
This is observable by:
Why? After calculating the correct width and height, the code was then adding the value of the variable
space
(six pixels on my system) to both calculated dimensions. As the cue-widgets are placed further and further away from position(0, 0)
, there is an ever-increasing margin where the top and left sides of a cue-widget are resolved by theindexAt
method to be either the cue-widget to the left or above the one the cursor is actually over.With the default 7x5 grid, the bottom-left most cue has a 42-pixel wide margin along its left side and a 30-pixel-high margin along its top side where the
indexAt
returns the grid id of the cue either to the left or above it.In the case that there is an actual cue to the left or above, then the user gets the context menu for that cue instead of the one underneath the cursor.
In the above case where there is no cue either to the left or above the cue,
NoneType
instead of a cue-widget is found at the calculated grid-reference, causing a fatal error when thisNoneType
is then asked for a property it does not possess.