To avoid redundant pop-ups, actions are disabled when generating a new label mask, and re-enabled after.
However, shape interpolation creates masks during interpolation mode. This introduced the following bug where shape-interpolation was not possible:
Shape interpolation mode is entered on pressing s. As a result, a listener is added to the allowedActionsProperty that checks if the allowed actions are changed, and if so exits shape interpolation mode.
Upon selecting a label, a mask is generated to show which label was selected
generating a mask triggers the allowedActionsProperty.disable()
disable() remove the current set of allowed actions and replaces them with an empty set (i.e. no actions are allowed).
Since we modified the allowedActionsProperty's contents, the aforementioned listener was triggered, and shape interpolation mode was exited.
The result of this bug is that shape-interpolation was not possible.
This PR resolves this bug. Since we don't want to exit interpolation mode during mask generation, we need to ensure that we are not in the process of enabling/disabling actions. If we are, then don't exit, since it is expected. If we are not enabling/disabling, then we want to proceed as usually, and exit interpolation mode.
To avoid redundant pop-ups, actions are disabled when generating a new label mask, and re-enabled after.
However, shape interpolation creates masks during interpolation mode. This introduced the following bug where shape-interpolation was not possible:
s
. As a result, a listener is added to theallowedActionsProperty
that checks if the allowed actions are changed, and if so exits shape interpolation mode.allowedActionsProperty.disable()
disable()
remove the current set of allowed actions and replaces them with an empty set (i.e. no actions are allowed).allowedActionsProperty
's contents, the aforementioned listener was triggered, and shape interpolation mode was exited.The result of this bug is that shape-interpolation was not possible.
This PR resolves this bug. Since we don't want to exit interpolation mode during mask generation, we need to ensure that we are not in the process of enabling/disabling actions. If we are, then don't exit, since it is expected. If we are not enabling/disabling, then we want to proceed as usually, and exit interpolation mode.