diff --git a/share/themes b/share/themes index 2fc6ece138323f905c9b475c3bcdef0d007eb233..ac13bb54dfb484ce4cf56405562b82b96d283c7c 160000 --- a/share/themes +++ b/share/themes @@ -1 +1 @@ -Subproject commit 2fc6ece138323f905c9b475c3bcdef0d007eb233 +Subproject commit ac13bb54dfb484ce4cf56405562b82b96d283c7c diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp index ed2947f48ebfcaf16b80ce031bd7d099361e284c..6764c51675cdec904516e7f9abb77417e0692526 100644 --- a/src/selection-chemistry.cpp +++ b/src/selection-chemistry.cpp @@ -1691,6 +1691,8 @@ void ObjectSet::applyAffine(Geom::Affine const &affine, bool set_i2d, bool compe auto offset = dynamic_cast(item); bool transform_offset_with_source = offset && offset->sourceHref && includes(sp_offset_get_source(offset)); + bool has_multiple_shapes = item->style->shape_inside.doesContain(this); + // If we're moving a connector, we want to detach it // from shapes that aren't part of the selection, but // leave it attached if they are @@ -1803,6 +1805,8 @@ void ObjectSet::applyAffine(Geom::Affine const &affine, bool set_i2d, bool compe // just apply the result item->doWriteTransform(result, &t, compensate); } + } else if (has_multiple_shapes) { + item->readAttr(SPAttr::TRANSFORM); } else { if (set_i2d) { diff --git a/src/style-internal.cpp b/src/style-internal.cpp index f50046d6c10f156cd4e11f345993feb32aa4d1ea..b1e66b61a587b277ba5e00b2c55b32dd00edce2a 100644 --- a/src/style-internal.cpp +++ b/src/style-internal.cpp @@ -36,6 +36,7 @@ #include "strneq.h" #include "object/sp-text.h" +#include "object/object-set.h" #include "svg/svg.h" #include "svg/svg-color.h" @@ -1302,11 +1303,15 @@ SPIShapes::SPIShapes() { } +bool SPIShapes::doesContain(Inkscape::ObjectSet *set) { + for (auto ref : hrefs) { + if (set->includes(ref->getObject())) { + return true; + } + } -//SPIShapes::~SPIShapes() { -// clear(); // Will segfault if called here. Seems to be already cleared. -//} - + return false; +} // Used to add/remove listeners for text wrapped in shapes. // Note: this is done differently than for patterns, etc. where presentation attributes can be used. diff --git a/src/style-internal.h b/src/style-internal.h index 3bece16714071680f95706396a918a67d94856d9..ded725fbc58a0633aad8c76aea7186d5d1fc73d8 100644 --- a/src/style-internal.h +++ b/src/style-internal.h @@ -39,6 +39,9 @@ #include "xml/repr.h" +namespace Inkscape { +class ObjectSet; +}; static const unsigned SP_STYLE_FLAG_ALWAYS (1 << 2); static const unsigned SP_STYLE_FLAG_IFSET (1 << 0); @@ -653,6 +656,7 @@ public: public: std::vector hrefs; + bool doesContain(Inkscape::ObjectSet *set); }; /// Color type internal to SPStyle, FIXME Add string value to store SVG named color.