Page MenuHomePhabricator

Connect actions of statemachine in subclasses of SegTool2D
Closed, ResolvedPublic

Description

Cuurently the actions are connected to member functions within the constructor of SegTool2D without even defining a concrete statemachine. These functions are all doing quite the same, just checking if the object can handle the action. For concrete interaction the functions are overriden in subclasses. This causes that there can be no other interaction or statemachine in subclasses of SegTool2D.

The solution will be to let the Tools connect their methods with the actions defined in their statemachine and provide a CanHandleEvent method in SegTool2D to check the event.

Event Timeline

[6c2f2e]: Merge branch 'bug-12887-connect-actions-in-subclasses-of-segtool2d'

Merged commits:

2012-08-16 14:10:31 Tobias Schroeder [b141a1]
connections to actions are now done within the tools


2012-08-16 14:09:19 Tobias Schroeder [86c1fb]
removed connecting actions and implemented a CanHandleEvent method instead

A new method was introduced in SegTool2D checking if the statemachine can handle the event. Removed connecting actions in constructor too.
Now the tools are responsible for connecting there methods with the appropriate action ids.