Git commit 0027d885661019e1fb60a4d3dac69bc019cbb744 by Dmitry Kazakov. Committed on 21/12/2016 at 10:26. Pushed by dkazakov into branch 'master'. [FEATURE] Allow deselection by clicking with a selection tool 1) Now you can deselect with *any* selection tool: rectangular, elliptical, outline. 2) Now you can also deselect with your tablet stylus, because there is a small tolerance level for considering your new selection as a click. If you made a selection that is smaller than 5 (view) pixels, then it is considered as a click and the tool deselects everything. 3) One can configure the click-tolerance level with a config option 'SelectionViewSizeMinimum' CC:kimageshop@kde.org # Conflicts: # libs/image/kis_algebra_2d.h M +29 -1 libs/image/kis_algebra_2d.h M +10 -0 libs/ui/kis_config.cc M +3 -0 libs/ui/kis_config.h M +18 -0 libs/ui/tool/kis_selection_tool_helper.cpp M +3 -1 libs/ui/tool/kis_selection_tool_helper.h M +3 -6 plugins/tools/selectiontools/kis_tool_select_elliptical.cc M +12 -2 plugins/tools/selectiontools/kis_tool_select_outline.cc M +1 -4 plugins/tools/selectiontools/kis_tool_select_rectangular.cc https://commits.kde.org/krita/0027d885661019e1fb60a4d3dac69bc019cbb744 diff --git a/libs/image/kis_algebra_2d.h b/libs/image/kis_algebra_2d.h index 4e48e8e3c24..ffdb84a62f1 100644 --- a/libs/image/kis_algebra_2d.h +++ b/libs/image/kis_algebra_2d.h @@ -41,6 +41,7 @@ struct PointTypeTraits { typedef int value_type; typedef qreal calculation_type; + typedef QRect rect_type; }; = template <> @@ -48,6 +49,7 @@ struct PointTypeTraits { typedef qreal value_type; typedef qreal calculation_type; + typedef QRectF rect_type; }; = = @@ -201,6 +203,27 @@ inline void accumulateBounds(const Point &pt, Rect *bo= unds) } } = +template