Revision cfc85f0...

Go back to digest for 4th March 2012

Features in KDE Base

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.

File Changes

Added 2 files
  • /ui/tool
  •   krita/kis_selection_tool_config_widget_helper.cpp
  •   krita/kis_selection_tool_config_widget_helper.h
Modified 29 files
  •   krita/ui/CMakeLists.txt
  •   krita/ui/tool/
  •   krita/ui/tool/kis_tool.h
  •   krita/ui/tool/kis_tool_ellipse_base.cpp
  •   krita/ui/tool/kis_tool_ellipse_base.h
  •   krita/ui/tool/
  •   krita/ui/tool/kis_tool_freehand.h
  •   krita/ui/tool/
  •   krita/ui/tool/kis_tool_paint.h
  •   krita/ui/tool/kis_tool_rectangle_base.cpp
  •   krita/ui/tool/kis_tool_select_base.cpp
  •   krita/ui/tool/kis_tool_select_base.h
  •   krita/plugins/tools/defaulttools/kis_tool_multihand.cpp
  •   krita/plugins/tools/selectiontools/
  •   krita/plugins/tools/selectiontools/kis_tool_select_brush.h
  •   krita/plugins/tools/selectiontools/
  •   krita/plugins/tools/selectiontools/
  •   krita/plugins/tools/selectiontools/kis_tool_select_elliptical.h
  •   krita/plugins/tools/selectiontools/
  •   krita/plugins/tools/selectiontools/
  •   krita/plugins/tools/selectiontools/kis_tool_select_outline.h
  •   krita/plugins/tools/selectiontools/
  •   krita/plugins/tools/selectiontools/kis_tool_select_path.h
  •   krita/plugins/tools/selectiontools/
  •   krita/plugins/tools/selectiontools/kis_tool_select_polygonal.h
  •   krita/plugins/tools/selectiontools/
  •   krita/plugins/tools/selectiontools/kis_tool_select_rectangular.h
  •   krita/plugins/tools/selectiontools/
  •   krita/plugins/tools/selectiontools/kis_tool_select_similar.h
31 files changed in total