Index: undo_act.c =================================================================== --- undo_act.c (revision 2505) +++ undo_act.c (revision 2506) @@ -129,20 +129,20 @@ char *function = ACTION_ARG(0); if (!function || !*function) { /* don't allow undo in the middle of an operation */ - if (conf_core.editor.mode != POLYGONHOLE_MODE && Crosshair.AttachedObject.State != STATE_FIRST) + if (conf_core.editor.mode != PCB_MODE_POLYGON_HOLE && Crosshair.AttachedObject.State != STATE_FIRST) return 1; - if (Crosshair.AttachedBox.State != STATE_FIRST && conf_core.editor.mode != ARC_MODE) + if (Crosshair.AttachedBox.State != STATE_FIRST && conf_core.editor.mode != PCB_MODE_ARC) return 1; /* undo the last operation */ notify_crosshair_change(false); - if ((conf_core.editor.mode == POLYGON_MODE || conf_core.editor.mode == POLYGONHOLE_MODE) && Crosshair.AttachedPolygon.PointN) { + if ((conf_core.editor.mode == PCB_MODE_POLYGON || conf_core.editor.mode == PCB_MODE_POLYGON_HOLE) && Crosshair.AttachedPolygon.PointN) { GoToPreviousPoint(); notify_crosshair_change(true); return 0; } /* move anchor point if undoing during line creation */ - if (conf_core.editor.mode == LINE_MODE) { + if (conf_core.editor.mode == PCB_MODE_LINE) { if (Crosshair.AttachedLine.State == STATE_SECOND) { if (conf_core.editor.auto_drc) Undo(true); /* undo the connection find */ @@ -207,7 +207,7 @@ return 0; } } - if (conf_core.editor.mode == ARC_MODE) { + if (conf_core.editor.mode == PCB_MODE_ARC) { if (Crosshair.AttachedBox.State == STATE_SECOND) { Crosshair.AttachedBox.State = STATE_FIRST; notify_crosshair_change(true); @@ -266,13 +266,13 @@ int ActionRedo(int argc, char **argv, Coord x, Coord y) { - if (((conf_core.editor.mode == POLYGON_MODE || - conf_core.editor.mode == POLYGONHOLE_MODE) && Crosshair.AttachedPolygon.PointN) || Crosshair.AttachedLine.State == STATE_SECOND) + if (((conf_core.editor.mode == PCB_MODE_POLYGON || + conf_core.editor.mode == PCB_MODE_POLYGON_HOLE) && Crosshair.AttachedPolygon.PointN) || Crosshair.AttachedLine.State == STATE_SECOND) return 1; notify_crosshair_change(false); if (Redo(true)) { SetChangedFlag(true); - if (conf_core.editor.mode == LINE_MODE && Crosshair.AttachedLine.State != STATE_FIRST) { + if (conf_core.editor.mode == PCB_MODE_LINE && Crosshair.AttachedLine.State != STATE_FIRST) { LineType *line = linelist_last(&CURRENT->Line); Crosshair.AttachedLine.Point1.X = Crosshair.AttachedLine.Point2.X = line->Point2.X; Crosshair.AttachedLine.Point1.Y = Crosshair.AttachedLine.Point2.Y = line->Point2.Y;