Index: trunk/src/action_helper.c =================================================================== --- trunk/src/action_helper.c (revision 12699) +++ trunk/src/action_helper.c (revision 12700) @@ -287,23 +287,6 @@ pcb_tool_adjust_attached_objects(); } -void pcb_notify_block(void) -{ - pcb_notify_crosshair_change(pcb_false); - switch (pcb_crosshair.AttachedBox.State) { - case PCB_CH_STATE_FIRST: /* setup first point */ - pcb_crosshair.AttachedBox.Point1.X = pcb_crosshair.AttachedBox.Point2.X = pcb_crosshair.X; - pcb_crosshair.AttachedBox.Point1.Y = pcb_crosshair.AttachedBox.Point2.Y = pcb_crosshair.Y; - pcb_crosshair.AttachedBox.State = PCB_CH_STATE_SECOND; - break; - - case PCB_CH_STATE_SECOND: /* setup second point */ - pcb_crosshair.AttachedBox.State = PCB_CH_STATE_THIRD; - break; - } - pcb_notify_crosshair_change(pcb_true); -} - void pcb_notify_mode(void) { if (conf_core.temp.rat_warn) Index: trunk/src/action_helper.h =================================================================== --- trunk/src/action_helper.h (revision 12699) +++ trunk/src/action_helper.h (revision 12700) @@ -46,7 +46,6 @@ extern int defer_needs_update; -void pcb_notify_block(void); /* create first or second corner of a marked block (when clicked) */ /* does what's appropriate for the current mode setting (when clicked). This normally means creation of an object at the current crosshair location. Index: trunk/src/select_act.c =================================================================== --- trunk/src/select_act.c (revision 12699) +++ trunk/src/select_act.c (revision 12700) @@ -34,6 +34,7 @@ #include "undo.h" #include "funchash_core.h" +#include "tool.h" #include "select.h" #include "draw.h" #include "remove.h" @@ -183,7 +184,7 @@ box.X2 = MAX(pcb_crosshair.AttachedBox.Point1.X, pcb_crosshair.AttachedBox.Point2.X); box.Y2 = MAX(pcb_crosshair.AttachedBox.Point1.Y, pcb_crosshair.AttachedBox.Point2.Y); pcb_notify_crosshair_change(pcb_false); - pcb_notify_block(); + pcb_tool_notify_block(); if (pcb_crosshair.AttachedBox.State == PCB_CH_STATE_THIRD && pcb_select_block(PCB, &box, pcb_true)) { pcb_board_set_changed_flag(pcb_true); pcb_crosshair.AttachedBox.State = PCB_CH_STATE_FIRST; @@ -354,7 +355,7 @@ box.X2 = MAX(pcb_crosshair.AttachedBox.Point1.X, pcb_crosshair.AttachedBox.Point2.X); box.Y2 = MAX(pcb_crosshair.AttachedBox.Point1.Y, pcb_crosshair.AttachedBox.Point2.Y); pcb_notify_crosshair_change(pcb_false); - pcb_notify_block(); + pcb_tool_notify_block(); if (pcb_crosshair.AttachedBox.State == PCB_CH_STATE_THIRD && pcb_select_block(PCB, &box, pcb_false)) { pcb_board_set_changed_flag(pcb_true); pcb_crosshair.AttachedBox.State = PCB_CH_STATE_FIRST; Index: trunk/src/tool.c =================================================================== --- trunk/src/tool.c (revision 12699) +++ trunk/src/tool.c (revision 12700) @@ -240,7 +240,24 @@ pcb_event(PCB_EVENT_RUBBER_LOOKUP_RATS, "ippp", pcb_crosshair.AttachedObject.Type, pcb_crosshair.AttachedObject.Ptr1, pcb_crosshair.AttachedObject.Ptr2, pcb_crosshair.AttachedObject.Ptr3); } +void pcb_tool_notify_block(void) +{ + pcb_notify_crosshair_change(pcb_false); + switch (pcb_crosshair.AttachedBox.State) { + case PCB_CH_STATE_FIRST: /* setup first point */ + pcb_crosshair.AttachedBox.Point1.X = pcb_crosshair.AttachedBox.Point2.X = pcb_crosshair.X; + pcb_crosshair.AttachedBox.Point1.Y = pcb_crosshair.AttachedBox.Point2.Y = pcb_crosshair.Y; + pcb_crosshair.AttachedBox.State = PCB_CH_STATE_SECOND; + break; + case PCB_CH_STATE_SECOND: /* setup second point */ + pcb_crosshair.AttachedBox.State = PCB_CH_STATE_THIRD; + break; + } + pcb_notify_crosshair_change(pcb_true); +} + + #warning tool TODO: move this out to a tool plugin #include "tool_arc.h" Index: trunk/src/tool.h =================================================================== --- trunk/src/tool.h (revision 12699) +++ trunk/src/tool.h (revision 12700) @@ -77,6 +77,7 @@ /**** tool helper functions ****/ void pcb_tool_attach_for_copy(pcb_coord_t PlaceX, pcb_coord_t PlaceY); +void pcb_tool_notify_block(void); /* create first or second corner of a marked block (when clicked) */ /**** Low level, for internal use ****/ Index: trunk/src/tool_arrow.c =================================================================== --- trunk/src/tool_arrow.c (revision 12699) +++ trunk/src/tool_arrow.c (revision 12700) @@ -99,7 +99,7 @@ /* unselect first if shift key not down */ if (!pcb_gui->shift_is_pressed() && pcb_select_block(PCB, &box, pcb_false)) pcb_board_set_changed_flag(pcb_true); - pcb_notify_block(); + pcb_tool_notify_block(); pcb_crosshair.AttachedBox.Point1.X = Note.X; pcb_crosshair.AttachedBox.Point1.Y = Note.Y; } Index: trunk/src/tool_rectangle.c =================================================================== --- trunk/src/tool_rectangle.c (revision 12699) +++ trunk/src/tool_rectangle.c (revision 12700) @@ -43,7 +43,7 @@ void pcb_tool_rectangle_notify_mode(void) { /* do update of position */ - pcb_notify_block(); + pcb_tool_notify_block(); /* create rectangle if both corners are determined * and width, height are != 0