summaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/layers.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2015-07-24 23:26:11 +0000
committerJabiertxof <jtx@jtx.marker.es>2015-07-24 23:26:11 +0000
commit7b6ffd82650ee1e20a53b0631d5c2dddef58e8d5 (patch)
tree48cae26bf789b11d79f72efc16a6676f960eaaa6 /src/ui/dialog/layers.cpp
parentupdate to trunk (diff)
parent3D box tool: the shift key must not prevent snapping of the vanishing point. ... (diff)
downloadinkscape-7b6ffd82650ee1e20a53b0631d5c2dddef58e8d5.tar.gz
inkscape-7b6ffd82650ee1e20a53b0631d5c2dddef58e8d5.zip
update to trunk
(bzr r12588.1.45)
Diffstat (limited to 'src/ui/dialog/layers.cpp')
-rw-r--r--src/ui/dialog/layers.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/ui/dialog/layers.cpp b/src/ui/dialog/layers.cpp
index 65351cb68..3f5e80f8d 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"));
-
+ _("Move layer"));
}
}