Page MenuHomePhabricator

Uneditable PlanarCross can be messed up
Closed, DuplicatePublic

Description

When you have a PlanarCross that is not editable (Bool-Property "planarfigure.iseditable" == false) and selected AND click onto one of the control-points, the figure is displayed incorrectly and the interactor remains in a dead state.

In my case, after clicking a control-point, most of the time, the second line was hidden. The reason for this is, that there is a transition from the state 'HoveringOverPoint' to 'PlaceFigure' that has the condition "reset_on_point_select_needed". This condition however, already does the actual action and modifies the planarFigure although it's not even allowed to do so (isEditable == false).

Through this transaction, the stateMachine is put into the state 'FigurePlaced', from which there is no transition to exit the state with an uneditable figure.

To fix this, I would like to add anadditional condition 'figure_is_editable' and an additional action 'reset_on_point_select'.
The current condition "reset_on_point_select_needed" only checks, the action performs the action. Thus, the PlanarFigure has to be extended with a method that only returns whether the points have to be reset.