From 3b8c4f31de73bd83057bffb8105498ae62be1984 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Sun, 10 May 2015 23:55:55 +0200 Subject: Fix for bug 1194091 Fixed bugs: - https://launchpad.net/bugs/1194091 (bzr r14142) --- src/sp-item.cpp | 40 ++++++++++++++-------------------------- src/ui/dialog/layers.cpp | 12 ++++++++++-- 2 files changed, 24 insertions(+), 28 deletions(-) (limited to 'src') diff --git a/src/sp-item.cpp b/src/sp-item.cpp index 8c99e9bcf..5445be947 100644 --- a/src/sp-item.cpp +++ b/src/sp-item.cpp @@ -349,17 +349,11 @@ void SPItem::lowerToBottom() { using Inkscape::Util::MutableList; using Inkscape::Util::reverse_list; - MutableList bottom=find_last_if( - reverse_list( - parent->firstChild(), this - ), - MutableList(), - &is_item - ); + SPObject * bottom=parent->firstChild(); + while(dynamic_cast(bottom) && dynamic_cast(bottom->next) && bottom!=this && !is_item(*(bottom->next))) bottom=bottom->next; if (bottom) { - ++bottom; Inkscape::XML::Node *ref = ( bottom ? bottom->getRepr() : NULL ); - getRepr()->parent()->changeOrder(getRepr(), ref); + parent->getRepr()->changeOrder(getRepr(), ref); } } @@ -367,20 +361,20 @@ void SPItem::moveTo(SPItem *target, bool intoafter) { Inkscape::XML::Node *target_ref = ( target ? target->getRepr() : NULL ); Inkscape::XML::Node *our_ref = getRepr(); - gboolean first = FALSE; - - if (target_ref == our_ref) { - // Move to ourself ignore - return; - } if (!target_ref) { // Assume move to the "first" in the top node, find the top node - target_ref = our_ref; - while (target_ref->parent() != target_ref->root()) { - target_ref = target_ref->parent(); + intoafter = false; + SPObject* bottom = this->document->getObjectByRepr(our_ref->root())->firstChild(); + while(!dynamic_cast(bottom->next)){ + bottom=bottom->next; } - first = TRUE; + target_ref = bottom->getRepr(); + } + + if (target_ref == our_ref) { + // Move to ourself ignore + return; } if (intoafter) { @@ -391,16 +385,10 @@ void SPItem::moveTo(SPItem *target, bool intoafter) { // Change in parent, need to remove and add our_ref->parent()->removeChild(our_ref); target_ref->parent()->addChild(our_ref, target_ref); - } else if (!first) { + } else { // Same parent, just move our_ref->parent()->changeOrder(our_ref, target_ref); } - - if (first && parent) { - // If "first" ensure it appears after the defs etc - lowerToBottom(); - return; - } } void SPItem::build(SPDocument *document, Inkscape::XML::Node *repr) { 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& /*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(_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")); - } } -- cgit v1.2.3 From 1d290ae90c78f35b67f474d34eef6f8fbeaa248c Mon Sep 17 00:00:00 2001 From: Nicolas Dufour Date: Mon, 11 May 2015 17:56:55 +0200 Subject: Metadata. Fix for Bug #1452266 (Outdated Creative Commons licenses). Fixed bugs: - https://launchpad.net/bugs/1452266 (bzr r14143) --- src/rdf.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/rdf.cpp b/src/rdf.cpp index 16344e520..938dc60c6 100644 --- a/src/rdf.cpp +++ b/src/rdf.cpp @@ -39,7 +39,7 @@ - @@ -173,32 +173,32 @@ struct rdf_double_t rdf_license_ofl [] = { struct rdf_license_t rdf_licenses [] = { { N_("CC Attribution"), - "http://creativecommons.org/licenses/by/3.0/", + "http://creativecommons.org/licenses/by/4.0/", rdf_license_cc_a, }, { N_("CC Attribution-ShareAlike"), - "http://creativecommons.org/licenses/by-sa/3.0/", + "http://creativecommons.org/licenses/by-sa/4.0/", rdf_license_cc_a_sa, }, { N_("CC Attribution-NoDerivs"), - "http://creativecommons.org/licenses/by-nd/3.0/", + "http://creativecommons.org/licenses/by-nd/4.0/", rdf_license_cc_a_nd, }, { N_("CC Attribution-NonCommercial"), - "http://creativecommons.org/licenses/by-nc/3.0/", + "http://creativecommons.org/licenses/by-nc/4.0/", rdf_license_cc_a_nc, }, { N_("CC Attribution-NonCommercial-ShareAlike"), - "http://creativecommons.org/licenses/by-nc-sa/3.0/", + "http://creativecommons.org/licenses/by-nc-sa/4.0/", rdf_license_cc_a_nc_sa, }, { N_("CC Attribution-NonCommercial-NoDerivs"), - "http://creativecommons.org/licenses/by-nc-nd/3.0/", + "http://creativecommons.org/licenses/by-nc-nd/4.0/", rdf_license_cc_a_nc_nd, }, -- cgit v1.2.3 From f7bd98a01dce9cb5a1532ab983c0b39b4d14d8f5 Mon Sep 17 00:00:00 2001 From: Nicolas Dufour Date: Mon, 11 May 2015 17:58:35 +0200 Subject: UI. Fix for Bug #1450875 (A change of the Image quality for an embedded/linked image can't be saved in some circumstances.). Fixed bugs: - https://launchpad.net/bugs/1450875 (bzr r14144) --- src/ui/dialog/object-properties.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/ui/dialog/object-properties.cpp b/src/ui/dialog/object-properties.cpp index fc21a30d4..75430ed44 100644 --- a/src/ui/dialog/object-properties.cpp +++ b/src/ui/dialog/object-properties.cpp @@ -529,10 +529,12 @@ void ObjectProperties::_imageRenderingChanged() SPCSSAttr *css = sp_repr_css_attr_new(); sp_repr_css_set_property(css, "image-rendering", scale.c_str()); Inkscape::XML::Node *image_node = item->getRepr(); - if( image_node ) { + if (image_node) { sp_repr_css_change(image_node, css, "style"); + DocumentUndo::done(SP_ACTIVE_DOCUMENT, SP_VERB_DIALOG_ITEM, + _("Set image rendering option")); } - sp_repr_css_attr_unref( css ); + sp_repr_css_attr_unref(css); _blocked = false; } -- cgit v1.2.3 From 7d5213c328e56fcb23169dd6b1633853ab04bf88 Mon Sep 17 00:00:00 2001 From: Yuri Chornoivan <> Date: Mon, 11 May 2015 18:07:41 +0200 Subject: Translations. Fix typo in the Color blindness filter and Ukrainian translation update. Fixed bugs: - https://launchpad.net/bugs/1407331 (bzr r14145) --- src/extension/internal/filter/color.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/extension/internal/filter/color.h b/src/extension/internal/filter/color.h index c3c26bf8b..b9c76615c 100644 --- a/src/extension/internal/filter/color.h +++ b/src/extension/internal/filter/color.h @@ -258,7 +258,7 @@ public: "\n" "<_item value=\"0.618 0.32 0.062 0 0 0.163 0.775 0.062 0 0 0.163 0.32 0.516 0 0 0 0 0 1 0 \">" N_("Rod monochromacy (atypical achromatopsia)") "\n" "<_item value=\"0.299 0.587 0.114 0 0 0.299 0.587 0.114 0 0 0.299 0.587 0.114 0 0 0 0 0 1 0 \">" N_("Cone monochromacy (typical achromatopsia)") "\n" - "<_item value=\"0.8 0.2 0 0 0 0.2583 0.74167 0 0 0 0 0.14167 0.85833 0 0 0 0 0 1 0 \">" N_("Geen weak (deuteranomaly)") "\n" + "<_item value=\"0.8 0.2 0 0 0 0.2583 0.74167 0 0 0 0 0.14167 0.85833 0 0 0 0 0 1 0 \">" N_("Green weak (deuteranomaly)") "\n" "<_item value=\"0.625 0.375 0 0 0 0.7 0.3 0 0 0 0 0.3 0.7 0 0 0 0 0 1 0 \">" N_("Green blind (deuteranopia)") "\n" "<_item value=\"0.8166 0.1833 0 0 0 0.333 0.666 0 0 0 0 0.125 0.875 0 0 0 0 0 1 0 \">" N_("Red weak (protanomaly)") "\n" "<_item value=\"0.566 0.43333 0 0 0 0.55833 0.4416 0 0 0 0 0.24167 0.75833 0 0 0 0 0 1 0 \">" N_("Red blind (protanopia)") "\n" -- cgit v1.2.3