Dmitry Kazakov committed changes in [calligra/tools-modifiers-fixes-kazakov] /:

Fixed mouse/modifies for tools again



Ok, this path fixes several things:



1) It removes almost all uses of m_localTool technique (except

path-based tools). This caused various problems with processing

of the events by two independent KisTool-based tools. Now it is gone,

and creation of the Options widget is done by a separate class:

KisSelectionToolConfigWidgetHelper. This class will probably disappear

as well, when the figure-based tools are united in a single class.

KisToolSelectBase now uses the helper as well and non-figure-based

classes inherit it.



2) It fixes processing of mouse/keyboard events in KisTool/KisToolPaint.

Well, *we really need to write some interaction-based system for the events*.

The state machine of the interactions must be written separately. I've fixed

this at least three times in the last two years. Such code does not live

longer than half a year. Another change will break them again.



Ok, I must admit that I was wrong suggesting using SECONDARY_HOVER_MODE for

showing the cursor of the color picker. If we did so we would have to introduce

even more modes like MIRROR_HOVER, PAN_HOVER. In this case it would be almost

impossible to deal with these states manually using 'if's. So what I did was

introducing KisToolPaint::specialHoverModeActive(), which is checked by the

KisToolFreehand. This is a hack, but it will go when we do the tools in a right

way. Currently, any change in this area will demand rewriting this part anyway.