Bug 408331 - Brush size display in toolbar not updated correctly
Summary: Brush size display in toolbar not updated correctly
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: 4.2.1
Platform: Appimage Linux
: NOR normal
Target Milestone: ---
Assignee: Tiar
URL:
Keywords:
: 408554 409432 409899 410047 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-06-05 10:09 UTC by Tyler
Modified: 2019-08-05 21:13 UTC (History)
12 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
screenshot (1.20 MB, image/png)
2019-06-05 10:09 UTC, Tyler
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tyler 2019-06-05 10:09:27 UTC
Created attachment 120594 [details]
screenshot

SUMMARY
Sometime when using shift+draw in canvas or [] to change brush size, the size display in the toolbar is not updated correctly according to the actual brush size. Size display in the popup palette is correct though.

STEPS TO REPRODUCE
1. 
2. 
3. 

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 vanyossi 2019-06-06 02:31:46 UTC
Is there any preset in particular that does this more than other?

On my setup I can't reproduce at all, size is always correct and on the same number as popup palette.
Comment 2 Tyler 2019-06-06 09:56:51 UTC
(In reply to vanyossi from comment #1)
> Is there any preset in particular that does this more than other?
> 
> On my setup I can't reproduce at all, size is always correct and on the same
> number as popup palette.

I think I always start with Airbrush. It appears to be happening only when Krita is started with Airbrush as last used brush.
Comment 3 vanyossi 2019-06-07 01:12:07 UTC
I can't reproduce this on macOS, sorry :(. Let me try the appimage…
Comment 4 Bug Janitor Service 2019-06-07 04:33:09 UTC
Thanks for your comment!

Automatically switching the status of this bug to REPORTED so that the KDE team
knows that the bug is ready to get confirmed.

In the future you may also do this yourself when providing needed information.
Comment 5 Halla Rempt 2019-06-07 08:00:17 UTC
I've been able to reproduce this yesterday actually or something like it; increasing the brush size with the ] shortcut didn't change the value in the toolbar. There's definitely something fishy going on.
Comment 6 vanyossi 2019-06-08 04:30:44 UTC
Weird, now I cant get brush size to diminish using '['
Comment 7 Tiar 2019-06-10 22:47:24 UTC
*** Bug 408554 has been marked as a duplicate of this bug. ***
Comment 8 David REVOY 2019-06-11 10:39:53 UTC
I was going to report this one today but I'm glad it was already reported. I'm commenting mainly to +1 and subscribe to the report. I can reproduce in both 4.2.1appimage and git~master. (brush shortcuts to grow/reduce brush size diameters doesn't update 'brush size' slider in top toolbar, nor shift+drag)
Comment 9 cadaverous.doll 2019-06-11 23:16:13 UTC
I want to point out this bug DOES NOT appear when using OpenGL as the display renderer for me (windows 10), but DOES appear when using Direct3D, at least for me. Not sure about the others.

I have to use the Direct3D because OpenGL gives me a slight 1second lag with new brush strokes otherwise (even after 4.2.1).

I just thought this would be interesting to note.
Comment 10 Halla Rempt 2019-06-12 14:36:30 UTC
That's really weird though, the two systems aren't connected...
Comment 11 Ahab Greybeard 2019-06-27 11:38:41 UTC
I find that the bug happens with appimages from 4.2.1 onwards and does not happen with 4.1.7. For me, it happens if I start krita with a Basic_1 brush preset (the Quick Brush Engine) but goes away if I change to another preset and does not return if I then switch back to Basic-1.

If I close krita with Basic_1 selected, it happens on the next restart.

If I close krita with another brush preset selected, then restart, it does not show a bug even if I choose Basic_1 as the first one I use.

If, after closing krita with Basic_1 selected, I delete the following line from kritarc:
"LastPreset=b)_Basic-1"
it does not happen on the next restart even if I use Basic_1 as the first brush preset I use.

I haven't done comprehensive testing with all brush engines or a wide range of brush presets.
Comment 12 mako_matt 2019-06-27 14:09:43 UTC
Same here, size slider not being updated when Krita start with "f) Dry roller" brush. For information direct3d Angle in the settings. in version 4.2.1 and 4.2.2.
Comment 13 Ahab Greybeard 2019-06-27 16:02:29 UTC
Using the 4.2.1 and later portable .zip packages on Windows 10, I find that the bug will happen with any brush preset if the last preset that was used is used immediately after starting krita. After using another preset, the bug goes away until next restart. If any other preset is selected first then the bug does not happen. 

If the line "LastPreset={preset name}" is removed from the kritarc file before starting krita, the bug will not happen until after a brush preset use, then a quit and restart.

It's the same as in the appimages except that it happens with any brush preset.

This happens with OpenGL as well as with Angle.

Using an appimage, I made a copy of 'b) Basic_1' and the copy did not show the bug when krita was started if it was the last brush preset used before Quiting.

The observations made by cadaverous.doll, in https://bugs.kde.org/show_bug.cgi?id=408554, regarding the behaviour of the brush editor's 'Reload' icon also hold true for what I've seen.
Comment 14 Halla Rempt 2019-07-02 20:28:03 UTC
*** Bug 409432 has been marked as a duplicate of this bug. ***
Comment 15 Tiar 2019-07-15 10:13:59 UTC
Serious side-effect - if you first change the brush size using one of those methods and then change Opacity or Flow using the toolbar, the brush size also changes to the one that is on the toolbar, so it's not only about UI being wrong, but it can actually disturb while painting.
Comment 16 Halla Rempt 2019-07-17 13:14:24 UTC
*** Bug 409899 has been marked as a duplicate of this bug. ***
Comment 17 Tiar 2019-07-21 11:54:17 UTC
*** Bug 410047 has been marked as a duplicate of this bug. ***
Comment 18 Tiar 2019-07-21 15:58:42 UTC
Git commit 711e962d4e384dcb913e7735906faf80cd6c879a by Agata Cacko.
Committed on 21/07/2019 at 15:57.
Pushed by tymond into branch 'master'.

Fix update brush size using shortcuts or drag

Before this commit, brush size slider wasn't updated.
This patch fixes this behaviour.

Looks like at the same time m_resources *doesn't* contain
a specific key while m_updateMediators does and needs
this connectResource thing.
The key in question is 6007 with KisPaintOpPresetSP value,
which means it's "CurrentPaintOpPreset".

This probably needs some more investigation. This fix will hide
the issue for users though. It is based on revert of the commit
7c2fce1dbdf005bfb33e687f6243f061b606ca5b.

M  +7    -4    libs/flake/KoResourceManager_p.cpp

https://invent.kde.org/kde/krita/commit/711e962d4e384dcb913e7735906faf80cd6c879a
Comment 19 vaderpizza3 2019-07-23 16:34:53 UTC
still happening in 4.2.3
Comment 20 mako_matt 2019-07-23 16:44:05 UTC
(In reply to vaderpizza3 from comment #19)
> still happening in 4.2.3

I think it was fix after the 4.2.3 release, test with the nightlies afeter 2019-07-21
Comment 21 Halla Rempt 2019-07-23 18:20:45 UTC
Exactly.
Comment 22 Halla Rempt 2019-07-29 08:35:39 UTC
Git commit 96b7cc07a25d198d6b8aa0291c85cb0bd333ca6a by Boudewijn Rempt, on behalf of Agata Cacko.
Committed on 29/07/2019 at 08:34.
Pushed by rempt into branch 'krita/4.2'.

Fix update brush size using shortcuts or drag

Before this commit, brush size slider wasn't updated.
This patch fixes this behaviour.

Looks like at the same time m_resources *doesn't* contain
a specific key while m_updateMediators does and needs
this connectResource thing.
The key in question is 6007 with KisPaintOpPresetSP value,
which means it's "CurrentPaintOpPreset".

This probably needs some more investigation. This fix will hide
the issue for users though. It is based on revert of the commit
7c2fce1dbdf005bfb33e687f6243f061b606ca5b.

M  +7    -4    libs/flake/KoResourceManager_p.cpp

https://invent.kde.org/kde/krita/commit/96b7cc07a25d198d6b8aa0291c85cb0bd333ca6a
Comment 23 Tyson Tan 2019-08-04 09:12:46 UTC
This is still happening in Krita 4.2.3, 4.2.4, krita-4.3.0-prealpha-f02c472-x86_64. It affects the Opacity slider in toolbar as well.

For some reason, it seems to affect EITHER Opacity OR Size slider, not both of them simultaneously. Yesterday my krita-4.3.0-prealpha-f02c472-x86_64 had its Size slider locked. But today it was the Opacity slider that got locked. The only things I did differently was:

1) using a mouse at first;
2) clicked P first;
3) clicked ; ' shorcuts first.
4) clicked [ ] ; ' after clicking the Opacity slider so it had some symbols as value which disappeared after I clicked ESC.

Now the Opacity slider is locked, not the Size slider. I tried many things but nothing changed.
Comment 24 Tiar 2019-08-04 20:08:36 UTC
I tested on both krita nightly appimage f02c472 and krita 4.2.5 appimage and both of them works as expected, which means that when I use I/O and [] shortcuts (and shift + drag, too), the slider of Opacity and Size changes and the opacity and size of the brush changes as well. Both sliders work also when you just change the value there - but it worked before, too.

What do you mean by "the slider is locked"? Before the problem was in updating the value of the slider, not that it was locked (you still could change it manually).

Could you please temporarily reset your settings (https://docs.krita.org/en/KritaFAQ.html#resetting-krita-configuration) before testing just to make sure?
Comment 25 Tyson Tan 2019-08-05 21:13:44 UTC
I deleted all settings and now it works normally. Thanks!
It makes me thinking that we might want a button dedicated to clear settings, or even better, a switch to use default settings temporary in next Krita session. Setting issues are often the cause of many problems, and it's scary because resetting costs user too much time to reconfigure.

(In reply to Tymond from comment #24)
> I tested on both krita nightly appimage f02c472 and krita 4.2.5 appimage and
> both of them works as expected, which means that when I use I/O and []
> shortcuts (and shift + drag, too), the slider of Opacity and Size changes
> and the opacity and size of the brush changes as well. Both sliders work
> also when you just change the value there - but it worked before, too.
> 
> What do you mean by "the slider is locked"? Before the problem was in
> updating the value of the slider, not that it was locked (you still could
> change it manually).
> 
> Could you please temporarily reset your settings
> (https://docs.krita.org/en/KritaFAQ.html#resetting-krita-configuration)
> before testing just to make sure?