diff options
| author | Jabier Arraiza <jabier.arraiza@marker.es> | 2017-11-03 00:10:02 +0000 |
|---|---|---|
| committer | Jabier Arraiza <jabier.arraiza@marker.es> | 2017-11-03 00:10:02 +0000 |
| commit | d2df0412f728dd5bb54537dfdfe7c35b34d40e0e (patch) | |
| tree | e2703384779e83312c456399999997fcc289c5cf /src/ui/tools/tweak-tool.cpp | |
| parent | Merge branch 'master' into powerpencil (diff) | |
| parent | change assignment to equality (diff) | |
| download | inkscape-d2df0412f728dd5bb54537dfdfe7c35b34d40e0e.tar.gz inkscape-d2df0412f728dd5bb54537dfdfe7c35b34d40e0e.zip | |
Merge branch 'master' into powerpencil
Diffstat (limited to 'src/ui/tools/tweak-tool.cpp')
| -rw-r--r-- | src/ui/tools/tweak-tool.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/ui/tools/tweak-tool.cpp b/src/ui/tools/tweak-tool.cpp index dcd9413fb..9348ef842 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) { @@ -1287,7 +1284,7 @@ bool TweakTool::root_handler(GdkEvent* event) { } case GDK_KEY_PRESS: { - switch (get_group0_keyval (&event->key)) { + switch (get_latin_keyval (&event->key)) { case GDK_KEY_m: case GDK_KEY_M: case GDK_KEY_0: @@ -1482,7 +1479,7 @@ bool TweakTool::root_handler(GdkEvent* event) { } case GDK_KEY_RELEASE: { Inkscape::Preferences *prefs = Inkscape::Preferences::get(); - switch (get_group0_keyval(&event->key)) { + switch (get_latin_keyval(&event->key)) { case GDK_KEY_Shift_L: case GDK_KEY_Shift_R: this->update_cursor(false); |
