When dragging a box around some ducks, holding SHIFT adds the surrounded ducks to...
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Thu, 30 Aug 2007 01:07:54 +0000 (01:07 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Thu, 30 Aug 2007 01:07:54 +0000 (01:07 +0000)
git-svn-id: http://svn.voria.com/code@562 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-studio/trunk/src/gtkmm/workarea.cpp

index d357003..56ee2dc 100644 (file)
@@ -1628,9 +1628,18 @@ WorkArea::on_drawing_area_event(GdkEvent *event)
                                if(canvas_view->get_smach().process_event(EventBox(drag_point,mouse_pos,MouseButton(event->button.button),modifier))==Smach::RESULT_ACCEPT)
                                        return true;
 
-                               if(!(modifier&GDK_CONTROL_MASK) && !(modifier&GDK_SHIFT_MASK))
+                               // when dragging a box around some ducks:
+                               // SHIFT selects; CTRL toggles; SHIFT+CTRL unselects; <none> clears all then selects
+                               if(modifier&GDK_SHIFT_MASK)
+                                       select_ducks_in_box(drag_point,mouse_pos);
+
+                               if(modifier&GDK_CONTROL_MASK)
+                                       toggle_select_ducks_in_box(drag_point,mouse_pos);
+                               else if(!(modifier&GDK_SHIFT_MASK))
+                               {
                                        clear_selected_ducks();
-                               select_ducks_in_box(drag_point,mouse_pos);
+                                       select_ducks_in_box(drag_point,mouse_pos);
+                               }
                                ret=true;
                        }
                        else