summaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/layers.cpp
diff options
context:
space:
mode:
authorMarc Jeanmougin <marc@jeanmougin.fr>2015-05-10 21:55:55 +0000
committerMarc Jeanmougin <marcjeanmougin@free.fr>2015-05-10 21:55:55 +0000
commit3b8c4f31de73bd83057bffb8105498ae62be1984 (patch)
treeb930ddb8fc3e1f8e005db32e0c4d9ea975246f2d /src/ui/dialog/layers.cpp
parentcmake: fix OpenMP detection and defines (inkscape uses 'HAVE_OPENMP') (diff)
downloadinkscape-3b8c4f31de73bd83057bffb8105498ae62be1984.tar.gz
inkscape-3b8c4f31de73bd83057bffb8105498ae62be1984.zip
Fix for bug 1194091
Fixed bugs: - https://launchpad.net/bugs/1194091 (bzr r14142)
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"));
-
}
}