Bug 322648 - Brush Size Value is set incorrectly
Summary: Brush Size Value is set incorrectly
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Brush engines (show other bugs)
Version: git master (please specify the git hash!)
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-21 10:46 UTC by Paul Geraskin
Modified: 2013-09-02 13:12 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Geraskin 2013-07-21 10:46:58 UTC
Hi devs.

I found a bug. If i set brush size with values, so there is incorrect size becomes.
For example, if i set 30 i'll get 29,78.
http://www.youtube.com/watch?v=rqnlatb1MQI
Comment 1 vanyossi 2013-07-25 15:26:10 UTC
Hi. I can confirm this bug.

The top bar size slider seems to round the value very simplistic, if the value is an integer it will round up or down avoiding having brush sizes of 0.14 (which makes size set to 0) or 0.85 (this one will go to 1), this works fine as long as other size sliders (brush presets menu b/e) does not set a float value like 5.85, 0.14, etc.

Is a float value is set, setting any value using the top bar size slider will not be respected. settings 5 will round to 4.75, or so. setting 1.0 will round to 0.89 or similar, effectively painting nothing as any value below 1 does not paint anything. Of course, setting the suggested value (for example 4.75) will respect that value.

The only work around to fix this misbehave is to set the slider to 1000 to "reset" the rounding function or set an integer value using the brush preset editor.
Comment 2 Dmitry Kazakov 2013-09-01 15:22:33 UTC
Git commit fe4c5944119bb9f5850c06a428c26a8a6f0624a4 by Dmitry Kazakov.
Committed on 01/09/2013 at 15:03.
Pushed by dkazakov into branch 'master'.

Fix the initial brush size value for the Clipboard Brush

Now the size of the brush is calculated dynamically basing on the real
content of the brush. That fixes some fall-backs in the Clipboard Brush.

M  +0    -7    krita/plugins/paintops/libpaintop/kis_brush_chooser.cpp
M  +0    -1    krita/plugins/paintops/libpaintop/kis_brush_chooser.h
M  +8    -11   krita/plugins/paintops/libpaintop/kis_brush_selection_widget.cpp
M  +1    -1    krita/plugins/paintops/libpaintop/kis_brush_selection_widget.h

http://commits.kde.org/calligra/fe4c5944119bb9f5850c06a428c26a8a6f0624a4
Comment 3 Dmitry Kazakov 2013-09-01 15:24:26 UTC
One more problem:

'Shift+ gesture' shortcut doesn't work after initial selection of a clipboard brush, You need to first change its size in the slider manually (then the brush is converted into the predefined one), after that you can use Shift+gesture.
Comment 4 Dmitry Kazakov 2013-09-01 17:58:21 UTC
Git commit dc530117b15b8a5e2885699ad3dbd4d2d886530c by Dmitry Kazakov.
Committed on 01/09/2013 at 17:46.
Pushed by dkazakov into branch 'master'.

Fixed the initial resize of the Custom and Clipboard brushes

M  +11   -1    krita/plugins/paintops/libpaintop/kis_brush_selection_widget.cpp

http://commits.kde.org/calligra/dc530117b15b8a5e2885699ad3dbd4d2d886530c
Comment 5 Dmitry Kazakov 2013-09-02 13:12:04 UTC
Git commit 81d4fa148565874a58ee62ef5fca4cc32e698352 by Dmitry Kazakov.
Committed on 02/09/2013 at 13:11.
Pushed by dkazakov into branch 'master'.

Changed parameter Scale to Size for predefined brushes

It has a few benefits:

1) It is easier for painters to operate with size than with scale
2) There is no cross-rounding problems between Scale and Size sliders.
   The existence of the Scale slider caused the values of the Size slider
   to be inexact.
3) Now there is a special 'Reset Brush' button that resets the scale of
   the brush to 1.0 and reloads other values.
Related: bug 318940

M  +47   -33   krita/plugins/paintops/libpaintop/kis_brush_chooser.cpp
M  +4    -3    krita/plugins/paintops/libpaintop/kis_brush_chooser.h

http://commits.kde.org/calligra/81d4fa148565874a58ee62ef5fca4cc32e698352