diff options
| author | Marc Jeanmougin <marc@jeanmougin.fr> | 2017-10-02 00:12:27 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marc@jeanmougin.fr> | 2017-10-02 00:12:27 +0000 |
| commit | 8761f46f7b8c2a2df82203f5be89d60072998a82 (patch) | |
| tree | 98718445ab30910a8e053bcf2a0d83a1b002630d /src/ui/tools/tweak-tool.cpp | |
| parent | First batch (diff) | |
| download | inkscape-8761f46f7b8c2a2df82203f5be89d60072998a82.tar.gz inkscape-8761f46f7b8c2a2df82203f5be89d60072998a82.zip | |
Second batch
Diffstat (limited to 'src/ui/tools/tweak-tool.cpp')
| -rw-r--r-- | src/ui/tools/tweak-tool.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/ui/tools/tweak-tool.cpp b/src/ui/tools/tweak-tool.cpp index dcd9413fb..fca96a483 100644 --- a/src/ui/tools/tweak-tool.cpp +++ b/src/ui/tools/tweak-tool.cpp @@ -374,23 +374,20 @@ sp_tweak_dilate_recursive (Inkscape::Selection *selection, SPItem *item, Geom::P } if (dynamic_cast<SPGroup *>(item) && !dynamic_cast<SPBox3D *>(item)) { - GSList *children = NULL; + std::vector<SPItem *> children; for (auto& child: item->children) { - if (dynamic_cast<SPItem *>(static_cast<SPObject *>(&child))) { - children = g_slist_prepend(children, &child); + if (dynamic_cast<SPItem *>(&child)) { + children.push_back(dynamic_cast<SPItem *>(&child)); } } - for (GSList *i = children; i; i = i->next) { - SPItem *child = dynamic_cast<SPItem *>(static_cast<SPObject *>(i->data)); + for (auto i = children.rbegin(); i!= children.rend(); ++i) { + SPItem *child = *i; g_assert(child != NULL); if (sp_tweak_dilate_recursive (selection, child, p, vector, mode, radius, force, fidelity, reverse)) { did = true; } } - - g_slist_free(children); - } else { if (mode == TWEAK_MODE_MOVE) { |
