Created attachment 116883 [details] Screenshot of my layers before and after merging SUMMARY Merging a layer down onto a layer that has several local selections will remove all but the active local selection. Tested on nightly build 6dc2f8a (Dec 11) and 1519ff6 (Nov 17). STEPS TO REPRODUCE 1. Have two layers, the lower one with 3 local selection masks, the upper one with none. 2. Merge upper layer down. OBSERVED RESULT The remaining lower layer will lose all of its selection masks—unless you had one selection mask active, in which case the active selection mask is the only one remaining. See attached screenshot. EXPECTED RESULT I keep all the selection masks. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Debian Stable with Gnome Qt Version: 5.7.1
(4.2.0-pre-alpha (git 95b09ea) - Ubuntu 14.04) I can confirm that only the "active" local selections will be kept (the remaining will be discarded). Steps: 1. create 2 layers, 2. add to each layer local selections 3. deactivate all the local selections 4. merge the 2 layers Actual Results: local selections will disappear Expected Results: keep the active and not active local selections, regardless.
Git commit 8cd5fbb73bdb0ca6d7610c5071fe7803e81906aa by Agata Cacko. Committed on 20/06/2019 at 21:08. Pushed by tymond into branch 'master'. Fix merging layers with not active selection masks Before this commit, there was an assumption in the merging code that a layer can have only one selection mask (which can be gathered using ->selectionMask() function). This caused all non-active selection mask to disappear during/after the merging. This commit fixes that behaviour by taking all children of the merged layer that happen to be KisSelectionMasks into account. Note: it doesn't mean all of the selection masks will be preserved; for now only the immediate child nodes of the selected layers are considered. M +5 -4 libs/image/kis_layer_utils.cpp https://invent.kde.org/kde/krita/commit/8cd5fbb73bdb0ca6d7610c5071fe7803e81906aa
Git commit e2d14a35d9474fd9f4b219123b46ac1ec2b9bf90 by Boudewijn Rempt, on behalf of Agata Cacko. Committed on 24/06/2019 at 08:20. Pushed by rempt into branch 'krita/4.2'. Fix merging layers with not active selection masks Before this commit, there was an assumption in the merging code that a layer can have only one selection mask (which can be gathered using ->selectionMask() function). This caused all non-active selection mask to disappear during/after the merging. This commit fixes that behaviour by taking all children of the merged layer that happen to be KisSelectionMasks into account. Note: it doesn't mean all of the selection masks will be preserved; for now only the immediate child nodes of the selected layers are considered. M +5 -4 libs/image/kis_layer_utils.cpp https://invent.kde.org/kde/krita/commit/e2d14a35d9474fd9f4b219123b46ac1ec2b9bf90