Open hanslovsky opened 5 years ago
Good point, the default mode where all actions are allowed combines all available ActionsType
s in the map: https://github.com/saalfeldlab/paintera/blob/master/src/main/java/org/janelia/saalfeldlab/paintera/control/actions/AllowedActions.java#L42-L51 which can be simplified with auto-discovery.
However, this ActionType
mechanism is a rather hacky design to make shape interpolation mode work properly. It basically allows to block or intercept certain UI actions without having to re-install event handlers. What I don't like about them currently is that they only list actions, but the actions themselves are defined in completely unrelated places. When we get to work on restructuring event handling as part of https://github.com/saalfeldlab/paintera/issues/245, it would probably also be a good time to re-iterate on ActionType
s.
I am not sure I understand the
ActionType
s to 100% yet but it looks to me that they could be auto-detectable. This might be useful for extensibility.