Bug 443579 - Values shown in the brush editor do not visually reset when reloading the preset
Summary: Values shown in the brush editor do not visually reset when reloading the preset
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Unclassified
Component: Resource Management (show other bugs)
Version: 5.0.0-beta2
Platform: Appimage Linux
: NOR normal
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords: regression, release_blocker
: 445365 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-10-11 04:19 UTC by tomtomtomreportingin
Modified: 2021-11-15 11:09 UTC (History)
3 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 tomtomtomreportingin 2021-10-11 04:19:43 UTC
SUMMARY
The settings shown in the brush editor do not visually reset when the brush is reset.

This is a new bug as of beta 2, so it is regressive. It also occurs in master (git 45ea106).

STEPS TO REPRODUCE
1. Select any brush.
2. Open brush editor.
3. Decrease diameter.
4. Reload the brush.

OBSERVED RESULT
The new diameter is still shown instead of the brush preset's default diameter.

EXPECTED RESULT
The default diameter of the brush should be shown.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Debian sid
KDE Plasma Version: 5.21.5
KDE Frameworks Version: 5.86.0
Qt Version: 5.12.11 (Appimage)
Comment 1 tomtomtomreportingin 2021-10-11 04:29:46 UTC
This is apparently not just a visual problem:

1. Select Basic 5 Size Opacity.
2. Open brush editor.
3. Increase diameter to max.
4. Reload brush.
5. Select Opacity setting.
6. Decrease Opacity by 1%.
7. Draw.

The brush now reutilizes the value from step 3.
Comment 2 Tiar 2021-10-11 23:41:37 UTC
Release blocker, because it's not just visual. Basically reloading is broken.

I can also confirm it on 5.1.0-prealpha (git 45ea106).
Comment 3 Dmitry Kazakov 2021-10-12 11:23:59 UTC
The issue happens because the editor doesn't get a notification about the changes inside the preset. Therefore its GUI elements still contain old values. After reloading, the brush itself has correct value, which can be visible if you paint on the scratch pad.
Comment 4 Dmitry Kazakov 2021-10-13 06:44:29 UTC
Git commit 7912525f87d4a1e62b4b95c6f2543e95c33da10f by Dmitry Kazakov.
Committed on 13/10/2021 at 06:44.
Pushed by dkazakov into branch 'master'.

Fix updates of the brush editor when the preset is chagned externally

When the preset is changes by keyboard shortcuts or by "reload" button,
the brush editor should see these changes. It was not needed before,
because the editor was a popup, but now it is a dialog, so shortcuts
are allowed while the editor is open.

M  +7    -1    libs/image/brushengine/KisPaintOpPresetUpdateProxy.cpp
M  +1    -0    libs/image/brushengine/KisPaintOpPresetUpdateProxy.h
M  +22   -2    libs/ui/kis_paintop_box.cc
M  +3    -0    libs/ui/kis_paintop_box.h

https://invent.kde.org/graphics/krita/commit/7912525f87d4a1e62b4b95c6f2543e95c33da10f
Comment 5 Dmitry Kazakov 2021-10-13 08:19:17 UTC
Git commit 44553b81ebca394155115b4301591b37aa0f33a2 by Dmitry Kazakov.
Committed on 13/10/2021 at 08:18.
Pushed by dkazakov into branch 'krita/5.0'.

Fix updates of the brush editor when the preset is chagned externally

When the preset is changes by keyboard shortcuts or by "reload" button,
the brush editor should see these changes. It was not needed before,
because the editor was a popup, but now it is a dialog, so shortcuts
are allowed while the editor is open.

M  +7    -1    libs/image/brushengine/KisPaintOpPresetUpdateProxy.cpp
M  +1    -0    libs/image/brushengine/KisPaintOpPresetUpdateProxy.h
M  +22   -2    libs/ui/kis_paintop_box.cc
M  +3    -0    libs/ui/kis_paintop_box.h

https://invent.kde.org/graphics/krita/commit/44553b81ebca394155115b4301591b37aa0f33a2
Comment 6 thetwo 2021-11-15 11:09:46 UTC
*** Bug 445365 has been marked as a duplicate of this bug. ***