summaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/layers.cpp
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2015-05-22 07:02:44 +0000
committerKrzysztof KosiƄski <tweenk.pl@gmail.com>2015-05-22 07:02:44 +0000
commit35d94a8e1c01cd60e4fcf4c15f46fee38c765fca (patch)
treed8366acd729a6a9d4bdc1001f050a43f30d8b7ad /src/ui/dialog/layers.cpp
parentUndo changes to CMakeLists.txt in 2geom directory after syncs (diff)
parentminor tweaks to libUEMF and related code (diff)
downloadinkscape-35d94a8e1c01cd60e4fcf4c15f46fee38c765fca.tar.gz
inkscape-35d94a8e1c01cd60e4fcf4c15f46fee38c765fca.zip
Merge from trunk
(bzr r14059.2.15)
Diffstat (limited to 'src/ui/dialog/layers.cpp')
-rw-r--r--src/ui/dialog/layers.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/ui/dialog/layers.cpp b/src/ui/dialog/layers.cpp
index 65351cb68..c6888386f 100644
--- a/src/ui/dialog/layers.cpp
+++ b/src/ui/dialog/layers.cpp
@@ -713,13 +713,21 @@ bool LayersPanel::_handleDragDrop(const Glib::RefPtr<Gdk::DragContext>& /*contex
*/
void LayersPanel::_doTreeMove( )
{
- if (_dnd_source ) {
+ if (_dnd_source && _dnd_source->getRepr() ) {
+ if(!_dnd_target){
+ _dnd_source->doWriteTransform(_dnd_source->getRepr(), _dnd_source->document->getRoot()->i2doc_affine().inverse() * _dnd_source->i2doc_affine());
+ }else{
+ SPItem* parent = _dnd_into ? _dnd_target : dynamic_cast<SPItem*>(_dnd_target->parent);
+ if(parent){
+ Geom::Affine move = parent->i2doc_affine().inverse() * _dnd_source->i2doc_affine();
+ _dnd_source->doWriteTransform(_dnd_source->getRepr(), move);
+ }
+ }
_dnd_source->moveTo(_dnd_target, _dnd_into);
_selectLayer(_dnd_source);
_dnd_source = NULL;
DocumentUndo::done( _desktop->doc() , SP_VERB_NONE,
_("Moved layer"));
-
}
}