Index: trunk/src/tool_line.c =================================================================== --- trunk/src/tool_line.c (revision 13502) +++ trunk/src/tool_line.c (revision 13503) @@ -350,7 +350,7 @@ /* save both ends of line */ pcb_crosshair.AttachedLine.Point2.X = ptr2->Point1.X; pcb_crosshair.AttachedLine.Point2.Y = ptr2->Point1.Y; - if ((type = pcb_undo(pcb_true))) + if ((type = pcb_undo(pcb_true)) == 0) pcb_board_set_changed_flag(pcb_true); /* check that the undo was of the right type */ if ((type & PCB_UNDO_CREATE) == 0) { Index: trunk/src/undo.c =================================================================== --- trunk/src/undo.c (revision 13502) +++ trunk/src/undo.c (revision 13503) @@ -89,12 +89,12 @@ if (pcb_uundo.num_undo == 0) { pcb_message(PCB_MSG_INFO, _("Nothing to undo - buffer is empty\n")); - return 0; + return -1; } if (pcb_uundo.serial == 0) { pcb_message(PCB_MSG_ERROR, _("ERROR: Attempt to pcb_undo() with Serial == 0\n" " Please save your work and report this bug.\n")); - return 0; + return -1; } if ((pcb_uundo.tail != NULL) && (pcb_uundo.tail->serial > pcb_uundo.serial)) { @@ -109,7 +109,7 @@ * the problem and allow the user to hit Undo again. */ pcb_uundo.serial = pcb_uundo.tail->serial + 1; - return 0; + return -1; } pcb_undo_lock(); /* lock undo module to prevent from loops */ Index: trunk/src/undo_act.c =================================================================== --- trunk/src/undo_act.c (revision 13502) +++ trunk/src/undo_act.c (revision 13503) @@ -132,7 +132,7 @@ if (!function || !*function) { pcb_notify_crosshair_change(pcb_false); if (pcb_tool_undo_act()) - if (pcb_undo(pcb_true)) + if (pcb_undo(pcb_true) == 0) pcb_board_set_changed_flag(pcb_true); } else if (function) {