diff options
| author | bulia byak <buliabyak@gmail.com> | 2009-03-22 20:14:05 +0000 |
|---|---|---|
| committer | buliabyak <buliabyak@users.sourceforge.net> | 2009-03-22 20:14:05 +0000 |
| commit | 78f2b3f463f6650b5105c9194c66794eeff2d0a6 (patch) | |
| tree | 91aa049587fa42c00c31cbcfd8ec50091106f116 /src/tweak-context.cpp | |
| parent | add support for DIMENSION entity (diff) | |
| download | inkscape-78f2b3f463f6650b5105c9194c66794eeff2d0a6.tar.gz inkscape-78f2b3f463f6650b5105c9194c66794eeff2d0a6.zip | |
fix crash when tweak-deleting objects in groups: you cannot get SP_OBJECT_NEXT from a deleted object
(bzr r7542)
Diffstat (limited to 'src/tweak-context.cpp')
| -rw-r--r-- | src/tweak-context.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/tweak-context.cpp b/src/tweak-context.cpp index 7d797915e..68e62b975 100644 --- a/src/tweak-context.cpp +++ b/src/tweak-context.cpp @@ -420,13 +420,21 @@ sp_tweak_dilate_recursive (Inkscape::Selection *selection, SPItem *item, Geom::P } if (SP_IS_GROUP(item) && !SP_IS_BOX3D(item)) { + GSList *children = NULL; for (SPObject *child = sp_object_first_child(SP_OBJECT(item)) ; child != NULL; child = SP_OBJECT_NEXT(child) ) { if (SP_IS_ITEM(child)) { - if (sp_tweak_dilate_recursive (selection, SP_ITEM(child), p, vector, mode, radius, force, fidelity, reverse)) - did = true; + children = g_slist_prepend(children, child); } } + for (GSList *i = children; i; i = i->next) { + SPItem *child = SP_ITEM(i->data); + if (sp_tweak_dilate_recursive (selection, SP_ITEM(child), p, vector, mode, radius, force, fidelity, reverse)) + did = true; + } + + g_slist_free(children); + } else { if (mode == TWEAK_MODE_MOVE) { @@ -524,6 +532,7 @@ sp_tweak_dilate_recursive (Inkscape::Selection *selection, SPItem *item, Geom::P } Inkscape::GC::release(copy); } + did = true; } } } |
