Selector as default tool
authordanigm <dani@danigm.net>
Tue, 4 May 2010 22:31:12 +0000 (00:31 +0200)
committerdanigm <dani@danigm.net>
Tue, 4 May 2010 22:31:12 +0000 (00:31 +0200)
src/tbo-window.c
src/ui-drawing.c

index bb6feb7..0bc74fb 100644 (file)
@@ -170,6 +170,7 @@ tbo_new_tbo (int width, int height)
     gtk_box_pack_start (GTK_BOX (container), status, FALSE, FALSE, 0);
 
     gtk_widget_show_all (window);
+    set_selected_tool_and_action (SELECTOR, tbo);
 
     return tbo;
 }
index 07539d7..342469a 100644 (file)
@@ -202,7 +202,14 @@ on_click_cb (GtkWidget    *widget,
     data[2] = tbo;
 
     tool = get_selected_tool ();
-    tool_signal (tool, TOOL_CLICK, data);
+    switch (tool)
+    {
+        case DOODLE:
+            set_selected_tool_and_action (SELECTOR, tbo);
+            tool = SELECTOR;
+        default:
+            tool_signal (tool, TOOL_CLICK, data);
+    }
     free (data);
 
     update_drawing (tbo);