Review Request 120610: Fix for Krita Bug 339870

Gerald Young supersayoyin at gmail.com
Fri Oct 17 03:53:12 BST 2014


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

(Updated Oct. 17, 2014, 2:53 a.m.)


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/6238bbee/attachment.htm>


More information about the calligra-devel mailing list