Bug 184746 - merging between two flake layers should result a flake layer
Summary: merging between two flake layers should result a flake layer
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Layers/Vector (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-18 03:40 UTC by Elián Hanisch
Modified: 2015-03-01 20:05 UTC (History)
2 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 Elián Hanisch 2009-02-18 03:40:52 UTC
Version:           2.0 beta-6 (using 4.1.2 (KDE 4.1.2), Kubuntu packages)
Compiler:          gcc
OS:                Linux (i686) release 2.6.24-23-generic

If you have two flake layers, merging them with the "merge with the layer below" (or ctrl + e) will result in a normal raster layer.

I would expect that the merging between two flake layers should result in a single flake layer containing the shapes of the two previous layers.
Comment 1 Halla Rempt 2011-05-26 21:59:09 UTC
Ack, full ack.
Comment 2 Aleksander Demko 2015-03-01 20:05:35 UTC
Git commit 82f9feb5c6010773a6e128e32a21ccf7e78eb9b7 by Aleksander Demko.
Committed on 01/03/2015 at 20:05.
Pushed by ademko into branch 'calligra/2.9'.

Added virtual KisLayer::createMergedLayer() and implemented it
for KisShapeLayer and KisGroupLayer. KisImage::mergeDown now
uses this method which now can be overridden by descendants
to specialize merge operations.

This fix seems to work, but I'm not sure if I've missed a corner
case or a use-case. Also, it might be useful to have a KoShape::clone(),
as the current code uses odf pasting to clone shapes, as that's
what the KisShapeLayer copy constructor did.

ccmail:kimageshop@kde.org

M  +21   -0    krita/image/kis_group_layer.cc
M  +3    -1    krita/image/kis_group_layer.h
M  +5    -58   krita/image/kis_image.cc
M  +66   -0    krita/image/kis_layer.cc
M  +13   -0    krita/image/kis_layer.h
M  +51   -0    krita/ui/flake/kis_shape_layer.cc
M  +10   -0    krita/ui/flake/kis_shape_layer.h

http://commits.kde.org/calligra/82f9feb5c6010773a6e128e32a21ccf7e78eb9b7