Bug 429371

Summary: Impossible to assign tag to a brush in master
Product: [Applications] krita Reporter: Vladimir Savic <vladimir.firefly.savic>
Component: TaggingAssignee: Halla Rempt <halla>
Status: RESOLVED FIXED    
Severity: normal CC: halla, loentar
Priority: NOR    
Version First Reported In: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: Manjaro   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: GDB stack trace of Crash log on pressing '/'

Description Vladimir Savic 2020-11-19 22:13:47 UTC
SUMMARY

I wanted to make my own Tag and make a list for quick approaching to most useful (at least to me) brushes. 


STEPS

1) Start Krita with preferences nuked (removed .krita dir and then tweaked setting to my liking)
2) Go to the "Choose brush preset" button
3) Switch to FX tag
4) Pick the first one; it's "k) Blender Blur"
5) Right-click on the preset icon
6) Assign to tag -> New tag
7) I've chosen to name it TMP
8) Hit the Enter key

OBSERVED RESULT

Empty "TMP" list appears

EXPECTED RESULT

One-entry TMP list appears. The preset is hopefully "k) Blender Blur"


Krita

 Version: 5.0.0-prealpha (git ce6c1d7)
 Languages: en_US, en
 Hidpi: true

Qt

  Version (compiled): 5.15.1
  Version (loaded): 5.15.1

OS Information

  Build ABI: x86_64-little_endian-lp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: linux
  Kernel Version: 5.9.8-1-MANJARO
  Pretty Productname: Manjaro Linux
  Product Type: manjaro
  Product Version: unknown
  Desktop: GNOME

OpenGL Info
 
  Vendor:  "X.Org" 
  Renderer:  "AMD Radeon (TM) RX 480 Graphics (POLARIS10, DRM 3.39.0, 5.9.8-1-MANJARO, LLVM 11.0.0)" 
  Version:  "4.6 (Compatibility Profile) Mesa 20.2.2" 
  Shading language:  "4.60" 
  Requested format:  QSurfaceFormat(version 3.0, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 0, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::CompatibilityProfile) 
  Current format:    QSurfaceFormat(version 4.6, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 0, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::CompatibilityProfile) 
     Version: 4.6
     Supports deprecated functions true 
     is OpenGL ES: false 

QPA OpenGL Detection Info 
  supportsDesktopGL: true 
  supportsOpenGLES: true 
  isQtPreferOpenGLES: false 

Hardware Information

  GPU Acceleration: auto
  Memory: 15971 Mb
  Number of Cores: 8
  Swap Location: /tmp

Current Settings

  Current Swap Location: /tmp
  Current Swap Location writable: true
  Undo Enabled: true
  Undo Stack Limit: 30
  Use OpenGL: true
  Use OpenGL Texture Buffer: true
  Use AMD Vectorization Workaround: false
  Canvas State: OPENGL_SUCCESS
  Autosave Interval: 300
  Use Backup Files: true
  Number of Backups Kept: 1
  Backup File Suffix: ~
  Backup Location: Same Folder as the File
  Backup Location writable: false
  Use Win8 Pointer Input: false
  Use RightMiddleTabletButton Workaround: true
  Levels of Detail Enabled: false
  Use Zip64: true


Display Information
Number of screens: 1
	Screen: 0
		Name: DisplayPort-1
		Depth: 24
		Scale: 1
		Resolution in pixels: 1920x1200
		Manufacturer: Eizo Nanao Corporation
		Model: EV2436W-
		Refresh Rate: 59.9502
Comment 1 Dmitrii Utkin 2020-11-24 07:06:16 UTC
This bug is reproducible for me either and it appear like regress for me.

Here are some additions:

1. Active brush TAG is is not preserved between Krita restarts. It always set to "All" on startup (regress)

2. When switching brushes with "Switch to previous preset" selected brush in Brush preset docker remain unchanged (regress)

3. Adding a new tag to the brush from preset doesn't add it to the tag until Krita is restarted, it's just visually switches to the target tag but the brush doesn't appear there. (regress)

Moreover on this I'm not sure if switching to the selected tag is a good idea, it's very inconvenient to add multiple brushes to single tag -- you have to switch to the previous tag and scroll down to the brush again.

In conjunction to the "Could not synchronize with the database" bug this makes the custom tags fully unusable.
Comment 2 Halla Rempt 2020-11-24 11:04:04 UTC
Git commit bde4d15a9869e84aaaef8466db42a4a7f8f9204b by Boudewijn Rempt.
Committed on 24/11/2020 at 10:23.
Pushed by rempt into branch 'master'.

Remove the extra filter model for the preset chooser

M  +20   -2    libs/resources/KisTagFilterResourceProxyModel.cpp
M  +11   -3    libs/resources/KisTagFilterResourceProxyModel.h
M  +10   -17   libs/resourcewidgets/KisResourceItemChooser.cpp
M  +4    -1    libs/resourcewidgets/KisResourceItemChooser.h
M  +17   -148  libs/ui/widgets/kis_preset_chooser.cpp

https://invent.kde.org/graphics/krita/commit/bde4d15a9869e84aaaef8466db42a4a7f8f9204b
Comment 3 Dmitrii Utkin 2020-11-24 20:34:07 UTC
Created attachment 133615 [details]
GDB stack trace of Crash log on pressing '/'

After the last change Krita started crashing on pressing the '/' key (previous preset).

To reproduce click on one brush, then on another and press '/'.

Sorry, I can't attach better stacktrace.
Comment 4 Vladimir Savic 2020-11-25 09:05:03 UTC
I'm still able to reproduce. :/
Comment 5 Halla Rempt 2020-11-25 09:10:36 UTC
Yes, I haven't fixed this yet... I've started working on it, but until the bug is marked as resolved, you don't have to tell me that you can still reproduce it.
Comment 6 Dmitrii Utkin 2020-11-27 18:07:44 UTC
Sorry for bothering, I forgot to mention that crash with switching presets by '/' is only reproducing when any Brush preset in exception to "All" and "All Untagged" is active.
Comment 7 Halla Rempt 2021-03-25 12:42:34 UTC
This works in 2f3e11e435