From 42ceb86a187d0e0714c67a420b84726fda5fae91 Mon Sep 17 00:00:00 2001 From: Jabiertxof Date: Mon, 16 Sep 2019 14:03:48 +0200 Subject: Allow paste on flowbox at same sice of origin, also improve creation to get rid of transforms on origin --- src/object/sp-flowtext.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/object/sp-flowtext.cpp') diff --git a/src/object/sp-flowtext.cpp b/src/object/sp-flowtext.cpp index 5d46c7b1e..05e06cff5 100644 --- a/src/object/sp-flowtext.cpp +++ b/src/object/sp-flowtext.cpp @@ -666,7 +666,10 @@ SPItem *create_flowtext_with_internal_frame (SPDesktop *desktop, Geom::Point p0, Geom::Coord const w = x1 - x0; Geom::Coord const h = y1 - y0; + SPItem *item = dynamic_cast(desktop->currentLayer()); + g_assert(item != nullptr); rect->setPosition(x0, y0, w, h); + rect->doWriteTransform(item->i2doc_affine().inverse(), nullptr, true); rect->updateRepr(); Inkscape::XML::Node *para_repr = xml_doc->createElement("svg:flowPara"); @@ -682,11 +685,6 @@ SPItem *create_flowtext_with_internal_frame (SPDesktop *desktop, Geom::Point p0, Inkscape::GC::release(para_repr); Inkscape::GC::release(rect_repr); - - SPItem *item = dynamic_cast(desktop->currentLayer()); - g_assert(item != nullptr); - ft_item->transform = item->i2doc_affine().inverse(); - return ft_item; } -- cgit v1.2.3