Bug 446706

Summary: Layer styles can be imported twice if import is done from the Resource Libraries dialog
Product: [Applications] krita Reporter: amyspark <amy>
Component: Resource ManagementAssignee: amyspark <amy>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: 5.0.0-beta5   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Screenshot of the bug

Description amyspark 2021-12-09 00:01:34 UTC
Created attachment 144371 [details]
Screenshot of the bug

SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***
Layer styles can be imported twice if import is done from the Resource Libraries dialog, and then from the Layer Style dialog. This is because we place the layer styles library in asl/ on the latter.

STEPS TO REPRODUCE
1. Import the desired layer style library from either of the dialogs.
2. Import the desired layer style library again from the remaining dialog.

OBSERVED RESULT
The import succeeds.

EXPECTED RESULT
The latter import is either skipped or asks for overwrite.

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

ADDITIONAL INFORMATION
Comment 1 Bug Janitor Service 2021-12-09 22:17:17 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/1215
Comment 2 amyspark 2021-12-13 19:59:39 UTC
Git commit 60c3c552540871fefc2bf2d9dba6d7beb1ab6a59 by L. E. Segovia.
Committed on 13/12/2021 at 19:57.
Pushed by lsegovia into branch 'master'.

Fix placement of ASL bundles

M  +1    -1    libs/ui/dialogs/kis_dlg_layer_style.cpp

https://invent.kde.org/graphics/krita/commit/60c3c552540871fefc2bf2d9dba6d7beb1ab6a59
Comment 3 amyspark 2021-12-13 20:00:49 UTC
Git commit a0f329afcc35bb5507181abd06ec4518ffa0891f by L. E. Segovia.
Committed on 13/12/2021 at 20:00.
Pushed by lsegovia into branch 'krita/5.0'.

Fix placement of ASL bundles
(cherry picked from commit 60c3c552540871fefc2bf2d9dba6d7beb1ab6a59)

M  +1    -1    libs/ui/dialogs/kis_dlg_layer_style.cpp

https://invent.kde.org/graphics/krita/commit/a0f329afcc35bb5507181abd06ec4518ffa0891f