Code

now that selection description includes style (filtered, clipped), we need to update...
[inkscape.git] / src / select-context.cpp
index 1daf6b0e56967be6363dfba5b2c67f47feb2b4df..fd4e132e1798cb054553f5e483a14b881916c90e 100644 (file)
@@ -326,7 +326,7 @@ sp_select_context_item_handler(SPEventContext *event_context, SPItem *item, GdkE
                     sc->moved = FALSE;
 
                     sp_canvas_force_full_redraw_after_interruptions(desktop->canvas, 5);
-                    
+
                     // remember the clicked item in sc->item:
                     if (sc->item) {
                         sp_object_unref(sc->item, NULL);
@@ -360,14 +360,17 @@ sp_select_context_item_handler(SPEventContext *event_context, SPItem *item, GdkE
 
         case GDK_ENTER_NOTIFY:
         {
-            GdkCursor *cursor = gdk_cursor_new(GDK_FLEUR);
-            gdk_window_set_cursor(GTK_WIDGET(sp_desktop_canvas(desktop))->window, cursor);
-            gdk_cursor_destroy(cursor);
+            if (!desktop->isWaitingCursor()) {
+                GdkCursor *cursor = gdk_cursor_new(GDK_FLEUR);
+                gdk_window_set_cursor(GTK_WIDGET(sp_desktop_canvas(desktop))->window, cursor);
+                gdk_cursor_destroy(cursor);
+            }
             break;
         }
 
         case GDK_LEAVE_NOTIFY:
-            gdk_window_set_cursor(GTK_WIDGET(sp_desktop_canvas(desktop))->window, event_context->cursor);
+            if (!desktop->isWaitingCursor())
+                gdk_window_set_cursor(GTK_WIDGET(sp_desktop_canvas(desktop))->window, event_context->cursor);
             break;
 
         case GDK_KEY_PRESS:
@@ -511,10 +514,10 @@ sp_select_context_root_handler(SPEventContext *event_context, GdkEvent *event)
                             item_in_group = desktop->item_at_point(Geom::Point(event->button.x, event->button.y), TRUE);
                             group_at_point = desktop->group_at_point(Geom::Point(event->button.x, event->button.y));
 
-                            // group-at-point is meant to be topmost item if it's a group, 
+                            // group-at-point is meant to be topmost item if it's a group,
                             // not topmost group of all items at point
-                            if (group_at_point != item_in_group && 
-                                !(group_at_point && item_at_point && 
+                            if (group_at_point != item_in_group &&
+                                !(group_at_point && item_at_point &&
                                   group_at_point->isAncestorOf(item_at_point)))
                                 group_at_point = NULL;
 
@@ -673,7 +676,7 @@ sp_select_context_root_handler(SPEventContext *event_context, GdkEvent *event)
                     sp_canvas_item_ungrab(sc->grabbed, event->button.time);
                     sc->grabbed = NULL;
                 }
-                
+
                 desktop->updateNow();
             }
             if (event->button.button == 1) {
@@ -713,7 +716,7 @@ sp_select_context_root_handler(SPEventContext *event_context, GdkEvent *event)
                                                 _("<b>Shift</b>: click to toggle select; drag for rubberband selection"),
                                                 _("<b>Alt</b>: click to select under; drag to move selected or select by touch"));
                     // if Alt and nonempty selection, show moving cursor ("move selected"):
-                    if (alt && !selection->isEmpty()) {
+                    if (alt && !selection->isEmpty() && !desktop->isWaitingCursor()) {
                         GdkCursor *cursor = gdk_cursor_new(GDK_FLEUR);
                         gdk_window_set_cursor(GTK_WIDGET(sp_desktop_canvas(desktop))->window, cursor);
                         gdk_cursor_destroy(cursor);
@@ -902,7 +905,7 @@ sp_select_context_root_handler(SPEventContext *event_context, GdkEvent *event)
                         }
                         ret = TRUE;
                     }
-                    break;                  
+                    break;
                 case GDK_g:
                 case GDK_G:
                     if (MOD__SHIFT_ONLY) {
@@ -935,7 +938,8 @@ sp_select_context_root_handler(SPEventContext *event_context, GdkEvent *event)
             }
             }
             // set cursor to default.
-            gdk_window_set_cursor(GTK_WIDGET(sp_desktop_canvas(desktop))->window, event_context->cursor);
+            if (!desktop->isWaitingCursor())
+                gdk_window_set_cursor(GTK_WIDGET(sp_desktop_canvas(desktop))->window, event_context->cursor);
             break;
         default:
             break;