Skip to content
  • Gerald Young's avatar
    Fixes Krita Bug 339870. · 88648473
    Gerald Young authored and Dmitry Kazakov's avatar Dmitry Kazakov committed
    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.
    
    BUG:339870
    REVIEW:120610
    
    Thanks Gerald Young for the patch! :)
    88648473