Review Request 120610: Fix for Krita Bug 339870

Dmitry Kazakov dimula73 at gmail.com
Fri Oct 17 14:26:27 BST 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/120610/#review68611
-----------------------------------------------------------

Ship it!


The patch is really nice! It fixes quite a subtle rounding bug. I'm ok with comming it, but you should fix the Tab<->Space issue to conform KDE code style policies first :)

https://techbase.kde.org/Policies/Kdelibs_Coding_Style

- Dmitry Kazakov


On Окт. 17, 2014, 2:53 д.п., Gerald Young wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/120610/
> -----------------------------------------------------------
> 
> (Updated Окт. 17, 2014, 2:53 д.п.)
> 
> 
> Review request for Calligra.
> 
> 
> Repository: calligra
> 
> 
> Description
> -------
> 
> Fixes Krita Bug 339870.
> 
> The issue was two fold. Firstly on krita/ui/tool/kis_tool_freehand.cc didn't respond well to slow dragging motions. The brush size can only increment in integer pixel values, but a slow dragging motion generates increments smaller than one pixel. These small increments get truncated once passed to brush settings and the drag motion is discarded. Solution was to accumulate the drag motion until it is higher than one pixel.
> 
> A second problem was that KisDoubleSliderSpinBox would implicitly convert the provided qreal to an int value. This conversion works like the floor function, for example turning a 0.1 into a 0 value (ok) and turning a -0.1 value into a -1 value (not ok). This was the cause of the weird behavior where brush size would decrease even when dragging right slowly. Solution was to use qRound to avoid the implicit conversion.
> 
> 
> Diffs
> -----
> 
>   krita/ui/tool/kis_tool_freehand.cc 76a0ce0 
>   krita/ui/widgets/kis_slider_spin_box.cpp f9a7fc0 
> 
> Diff: https://git.reviewboard.kde.org/r/120610/diff/
> 
> 
> Testing
> -------
> 
> Tested doing shift+drag and size increases/decreases normally. Slow shift+dragging also increases/decreases the brush size properly. Tried also at high zoom ratios and also works as expected.
> 
> 
> Thanks,
> 
> Gerald Young
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20141017/50ee9822/attachment.htm>


More information about the calligra-devel mailing list