Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Office
Calligra
Commits
9fcedeec
Commit
9fcedeec
authored
Apr 04, 2012
by
Halla Rempt
Browse files
Fix D&D of shape layers
BUG:297393
parent
9be3868e
Changes
1
Hide whitespace changes
Inline
Side-by-side
krita/ui/kis_view2.cpp
View file @
9fcedeec
...
...
@@ -115,6 +115,7 @@
#include "kis_painting_assistants_manager.h"
#include <kis_paint_layer.h>
#include "kis_progress_widget.h"
#include "kis_shape_layer.h"
#include <QDebug>
#include <QPoint>
...
...
@@ -456,8 +457,20 @@ void KisView2::dropEvent(QDropEvent *event)
if
(
layer
)
{
layer
->
setImage
(
kisimage
);
}
KisShapeLayer
*
shapeLayer
=
dynamic_cast
<
KisShapeLayer
*>
(
node
.
data
());
if
(
shapeLayer
)
{
KoShapeContainer
*
parentContainer
=
dynamic_cast
<
KoShapeContainer
*>
(
m_d
->
doc
->
shapeForNode
(
kisimage
->
rootLayer
()));
KisShapeLayer
*
shapeLayer2
=
new
KisShapeLayer
(
parentContainer
,
m_d
->
doc
->
shapeController
(),
kisimage
,
node
->
name
(),
node
->
opacity
());
QList
<
KoShape
*>
shapes
=
shapeLayer
->
shapes
();
shapeLayer
->
removeAllShapes
();
foreach
(
KoShape
*
shape
,
shapes
)
{
shapeLayer2
->
addShape
(
shape
);
}
node
=
shapeLayer2
;
}
node
->
setName
(
i18n
(
"Pasted Layer"
));
}
else
if
(
event
->
mimeData
()
->
hasImage
())
{
QImage
qimage
=
qvariant_cast
<
QImage
>
(
event
->
mimeData
()
->
imageData
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment