Bug 459797

Summary: Locking a layer does not prevent pasting an object on vector layers
Product: [Applications] krita Reporter: Dmitry <zalimannard>
Component: Layer StackAssignee: vanyossi <ghevan>
Status: RESOLVED FIXED    
Severity: normal CC: ghevan
Priority: NOR    
Version First Reported In: 5.1.1   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Dmitry 2022-09-28 17:47:53 UTC
SUMMARY
When inserting an object on a blocked layer, the insertion is successful


STEPS TO REPRODUCE
1. Create the first layer.
2. Block the first layer.
3. Create a second layer.
4. Insert the object on the second layer. For example, a line.
5. Select this object and press Ctrl+X.
6. Select the first layer.
7. Press Ctrl+V.

OBSERVED RESULT
The object was successfully inserted on the blocked layer

EXPECTED RESULT
Nothing happened

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.25.5
KDE Frameworks Version: 5.98.0
Qt Version: 5.15.6
Kernel Version: 5.19.11-zen1-1-zen (64-bit)
Comment 1 vanyossi 2022-09-28 21:47:33 UTC
This is for vector layers
Locking a layer does not prevent from pasting objects from the clipboard.
Comment 2 vanyossi 2022-09-30 02:22:40 UTC
Git commit 68264e4ba2e57eb7d4b636f5cb8c5399fca9bbef by Ivan Yossi.
Committed on 30/09/2022 at 02:21.
Pushed by ivany into branch 'master'.

Do nothing if target layer is locked

M  +1    -1    libs/ui/actions/KisPasteActionFactories.cpp

https://invent.kde.org/graphics/krita/commit/68264e4ba2e57eb7d4b636f5cb8c5399fca9bbef