Code

merge
[inkscape.git] / src / tweak-context.cpp
index fd8f098fe9664bd69a85958905baed57bad45a07..3f55d040bc426a0f806c2d0f37617da34c167395 100644 (file)
@@ -29,7 +29,6 @@
 #include "desktop.h"
 #include "desktop-events.h"
 #include "desktop-handles.h"
-#include "desktop-affine.h"
 #include "desktop-style.h"
 #include "message-context.h"
 #include "pixmaps/cursor-tweak-move.xpm"
@@ -209,23 +208,27 @@ sp_tweak_update_cursor (SPTweakContext *tc, bool with_shift)
    switch (tc->mode) {
        case TWEAK_MODE_MOVE:
            tc->_message_context->setF(Inkscape::NORMAL_MESSAGE, _("%s. Drag to <b>move</b>."), sel_message);
-                           break;
            event_context->cursor_shape = cursor_tweak_move_xpm;
            break;
        case TWEAK_MODE_MOVE_IN_OUT:
            tc->_message_context->setF(Inkscape::NORMAL_MESSAGE, _("%s. Drag or click to <b>move in</b>; with Shift to <b>move out</b>."), sel_message);
+           event_context->cursor_shape = cursor_tweak_move_xpm;
            break;
        case TWEAK_MODE_MOVE_JITTER:
            tc->_message_context->setF(Inkscape::NORMAL_MESSAGE, _("%s. Drag or click to <b>move randomly</b>."), sel_message);
+           event_context->cursor_shape = cursor_tweak_move_xpm;
            break;
        case TWEAK_MODE_SCALE:
            tc->_message_context->setF(Inkscape::NORMAL_MESSAGE, _("%s. Drag or click to <b>scale down</b>; with Shift to <b>scale up</b>."), sel_message);
+           event_context->cursor_shape = cursor_tweak_move_xpm;
            break;
        case TWEAK_MODE_ROTATE:
            tc->_message_context->setF(Inkscape::NORMAL_MESSAGE, _("%s. Drag or click to <b>rotate clockwise</b>; with Shift, <b>counterclockwise</b>."), sel_message);
+           event_context->cursor_shape = cursor_tweak_move_xpm;
            break;
        case TWEAK_MODE_MORELESS:
            tc->_message_context->setF(Inkscape::NORMAL_MESSAGE, _("%s. Drag or click to <b>duplicate</b>; with Shift, <b>delete</b>."), sel_message);
+           event_context->cursor_shape = cursor_tweak_move_xpm;
            break;
        case TWEAK_MODE_PUSH:
            tc->_message_context->setF(Inkscape::NORMAL_MESSAGE, _("%s. Drag to <b>push paths</b>."), sel_message);
@@ -253,6 +256,7 @@ sp_tweak_update_cursor (SPTweakContext *tc, bool with_shift)
            break;
        case TWEAK_MODE_COLORPAINT:
            tc->_message_context->setF(Inkscape::NORMAL_MESSAGE, _("%s. Drag or click to <b>paint objects</b> with color."), sel_message);
+           event_context->cursor_shape = cursor_color_xpm;
            break;
        case TWEAK_MODE_COLORJITTER:
            tc->_message_context->setF(Inkscape::NORMAL_MESSAGE, _("%s. Drag or click to <b>randomize colors</b>."), sel_message);
@@ -421,13 +425,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) {
 
@@ -525,6 +537,7 @@ sp_tweak_dilate_recursive (Inkscape::Selection *selection, SPItem *item, Geom::P
                             }
                             Inkscape::GC::release(copy);
                         }
+                        did = true;
                     }
                 }
             }