Index: trunk/src/change.c =================================================================== --- trunk/src/change.c (revision 10806) +++ trunk/src/change.c (revision 10807) @@ -456,8 +456,8 @@ ctx.chgsize.pcb = PCB; ctx.chgsize.is_primary = 1; - ctx.chgsize.absolute = (fixIt) ? Difference : 0; - ctx.chgsize.delta = Difference; + ctx.chgsize.is_absolute = fixIt; + ctx.chgsize.value = Difference; change = pcb_selected_operation(PCB, &ChangeSizeFunctions, &ctx, pcb_false, types); if (change) { @@ -478,8 +478,8 @@ ctx.chgsize.pcb = PCB; ctx.chgsize.is_primary = 1; - ctx.chgsize.absolute = (fixIt) ? Difference : 0; - ctx.chgsize.delta = Difference; + ctx.chgsize.is_absolute = fixIt; + ctx.chgsize.value = Difference; if (pcb_mask_on(PCB)) change = pcb_selected_operation(PCB, &ChangeMaskSizeFunctions, &ctx, pcb_false, types); @@ -503,8 +503,8 @@ ctx.chgsize.pcb = PCB; ctx.chgsize.is_primary = 1; - ctx.chgsize.absolute = (fixIt) ? Difference : 0; - ctx.chgsize.delta = Difference; + ctx.chgsize.is_absolute = fixIt; + ctx.chgsize.value = Difference; change = pcb_selected_operation(PCB, &Change2ndSizeFunctions, &ctx, pcb_false, types); if (change) { @@ -660,8 +660,8 @@ ctx.chgangle.pcb = PCB; ctx.chgangle.is_primary = is_start; - ctx.chgangle.absolute = (fixIt) ? Difference : 0; - ctx.chgangle.delta = Difference; + ctx.chgangle.is_absolute = fixIt; + ctx.chgangle.value = Difference; change = pcb_selected_operation(PCB, &ChangeAngleFunctions, &ctx, pcb_false, types); if (change) { @@ -682,8 +682,8 @@ ctx.chgsize.pcb = PCB; ctx.chgsize.is_primary = is_start; - ctx.chgsize.absolute = (fixIt) ? Difference : 0; - ctx.chgsize.delta = Difference; + ctx.chgsize.is_absolute = fixIt; + ctx.chgsize.value = Difference; change = pcb_selected_operation(PCB, &ChangeRadiusFunctions, &ctx, pcb_false, types); if (change) { @@ -844,8 +844,8 @@ ctx.chgsize.pcb = PCB; ctx.chgsize.is_primary = 1; - ctx.chgsize.absolute = (fixIt) ? Difference : 0; - ctx.chgsize.delta = Difference; + ctx.chgsize.is_absolute = fixIt; + ctx.chgsize.value = Difference; change = (pcb_object_operation(&ChangeSizeFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL); if (change) { @@ -866,8 +866,8 @@ ctx.chgsize.pcb = PCB; ctx.chgsize.is_primary = 1; - ctx.chgsize.absolute = (fixIt) ? Difference : 0; - ctx.chgsize.delta = Difference; + ctx.chgsize.is_absolute = fixIt; + ctx.chgsize.value = Difference; change = (pcb_object_operation(&Change1stSizeFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL); if (change) { @@ -888,8 +888,8 @@ ctx.chgsize.pcb = PCB; ctx.chgsize.is_primary = is_x; - ctx.chgsize.absolute = (fixIt) ? r : 0; - ctx.chgsize.delta = r; + ctx.chgsize.is_absolute = fixIt; + ctx.chgsize.value = r; change = (pcb_object_operation(&ChangeRadiusFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL); if (change) { @@ -900,7 +900,7 @@ } /* --------------------------------------------------------------------------- - * changes the angles of the passed object (e.g. arc start/ctx->chgsize.delta) + * changes the angles of the passed object (e.g. arc start/ctx->chgsize.value) * Returns pcb_true if anything is changed */ pcb_bool pcb_chg_obj_angle(int Type, void *Ptr1, void *Ptr2, void *Ptr3, int is_start, pcb_angle_t a, pcb_bool fixIt) @@ -910,8 +910,8 @@ ctx.chgangle.pcb = PCB; ctx.chgangle.is_primary = is_start; - ctx.chgangle.absolute = (fixIt) ? a : 0; - ctx.chgangle.delta = a; + ctx.chgangle.is_absolute = fixIt; + ctx.chgangle.value = a; change = (pcb_object_operation(&ChangeAngleFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL); if (change) { @@ -933,8 +933,8 @@ ctx.chgsize.pcb = PCB; ctx.chgsize.is_primary = 1; - ctx.chgsize.absolute = (fixIt) ? Difference : 0; - ctx.chgsize.delta = Difference; + ctx.chgsize.is_absolute = fixIt; + ctx.chgsize.value = Difference; if (pcb_mask_on(PCB)) change = (pcb_object_operation(&ChangeMaskSizeFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL); @@ -979,8 +979,8 @@ ctx.chgsize.pcb = PCB; ctx.chgsize.is_primary = 1; - ctx.chgsize.absolute = (fixIt) ? Difference : 0; - ctx.chgsize.delta = Difference; + ctx.chgsize.is_absolute = fixIt; + ctx.chgsize.value = Difference; change = (pcb_object_operation(&Change2ndSizeFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL); if (change) { @@ -1002,8 +1002,8 @@ ctx.chgsize.pcb = PCB; ctx.chgsize.is_primary = 1; - ctx.chgsize.absolute = (fixIt) ? Difference : 0; - ctx.chgsize.delta = Difference; + ctx.chgsize.is_absolute = fixIt; + ctx.chgsize.value = Difference; change = (pcb_object_operation(&ChangeMaskSizeFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL); if (change) { @@ -1134,7 +1134,7 @@ pcb_opctx_t ctx; ctx.chgsize.pcb = PCB; - ctx.chgsize.absolute = style; + ctx.chgsize.value = style; if (pcb_object_operation(&ChangeSquareFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL) { pcb_draw(); Index: trunk/src/obj_arc.c =================================================================== --- trunk/src/obj_arc.c (revision 10806) +++ trunk/src/obj_arc.c (revision 10807) @@ -350,7 +350,7 @@ /* changes the size of an arc */ void *pcb_arcop_change_size(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_arc_t *Arc) { - pcb_coord_t value = (ctx->chgsize.absolute) ? ctx->chgsize.absolute : Arc->Thickness + ctx->chgsize.delta; + pcb_coord_t value = (ctx->chgsize.is_absolute) ? ctx->chgsize.value : Arc->Thickness + ctx->chgsize.value; if (PCB_FLAG_TEST(PCB_FLAG_LOCK, Arc)) return (NULL); @@ -372,7 +372,7 @@ /* changes the clearance size of an arc */ void *pcb_arcop_change_clear_size(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_arc_t *Arc) { - pcb_coord_t value = (ctx->chgsize.absolute) ? ctx->chgsize.absolute : Arc->Clearance + ctx->chgsize.delta; + pcb_coord_t value = (ctx->chgsize.is_absolute) ? ctx->chgsize.value : Arc->Clearance + ctx->chgsize.value; if (PCB_FLAG_TEST(PCB_FLAG_LOCK, Arc) || !PCB_FLAG_TEST(PCB_FLAG_CLEARLINE, Arc)) return (NULL); @@ -418,7 +418,7 @@ return NULL; } - value = (ctx->chgsize.absolute) ? ctx->chgsize.absolute : (*dst) + ctx->chgsize.delta; + value = (ctx->chgsize.is_absolute) ? ctx->chgsize.value : (*dst) + ctx->chgsize.value; value = MIN(PCB_MAX_ARCSIZE, MAX(value, PCB_MIN_ARCSIZE)); if (value != *dst) { pcb_undo_add_obj_to_change_radii(PCB_TYPE_ARC, Layer, Arc, Arc); @@ -455,7 +455,7 @@ return NULL; } - value = (ctx->chgangle.absolute) ? ctx->chgangle.absolute : (*dst) + ctx->chgangle.delta; + value = (ctx->chgangle.is_absolute) ? ctx->chgangle.value : (*dst) + ctx->chgangle.value; value = fmod(value, 360.0); if (value < 0) value += 360; Index: trunk/src/obj_elem.c =================================================================== --- trunk/src/obj_elem.c (revision 10806) +++ trunk/src/obj_elem.c (revision 10807) @@ -1337,7 +1337,7 @@ return (NULL); PCB_PIN_LOOP(Element); { - value = (ctx->chgsize.absolute) ? ctx->chgsize.absolute : pin->DrillingHole + ctx->chgsize.delta; + value = (ctx->chgsize.is_absolute) ? ctx->chgsize.value : pin->DrillingHole + ctx->chgsize.value; if (value <= PCB_MAX_PINORVIASIZE && value >= PCB_MIN_PINORVIAHOLE && (PCB_FLAG_TEST(PCB_FLAG_HOLE, pin) || value <= pin->Thickness - PCB_MIN_PINORVIACOPPER) && value != pin->DrillingHole) { @@ -1371,7 +1371,7 @@ return (NULL); PCB_PIN_LOOP(Element); { - value = (ctx->chgsize.absolute) ? ctx->chgsize.absolute : pin->DrillingHole + ctx->chgsize.delta; + value = (ctx->chgsize.is_absolute) ? ctx->chgsize.value : pin->DrillingHole + ctx->chgsize.value; if (value <= PCB_MAX_PINORVIASIZE && value >= pin->DrillingHole + PCB_MIN_PINORVIACOPPER && value != pin->Thickness) { changed = pcb_true; pcb_undo_add_obj_to_size(PCB_TYPE_PIN, Element, pin, pin); @@ -1403,7 +1403,7 @@ return (NULL); PCB_PIN_LOOP(Element); { - value = (ctx->chgsize.absolute) ? ctx->chgsize.absolute : pin->Clearance + ctx->chgsize.delta; + value = (ctx->chgsize.is_absolute) ? ctx->chgsize.value : pin->Clearance + ctx->chgsize.value; if (value <= PCB_MAX_PINORVIASIZE && value >= PCB_MIN_PINORVIAHOLE && (PCB_FLAG_TEST(PCB_FLAG_HOLE, pin) || value <= pin->Thickness - PCB_MIN_PINORVIACOPPER) && value != pin->Clearance) { @@ -1424,7 +1424,7 @@ PCB_PAD_LOOP(Element); { - value = (ctx->chgsize.absolute) ? ctx->chgsize.absolute : pad->Clearance + ctx->chgsize.delta; + value = (ctx->chgsize.is_absolute) ? ctx->chgsize.value : pad->Clearance + ctx->chgsize.value; if (value <= PCB_MAX_PINORVIASIZE && value >= PCB_MIN_PINORVIAHOLE && value != pad->Clearance) { changed = pcb_true; pcb_undo_add_obj_to_clear_size(PCB_TYPE_PAD, Element, pad, pad); @@ -1463,7 +1463,7 @@ pcb_elem_invalidate_erase(Element); PCB_ELEMENT_PCB_LINE_LOOP(Element); { - value = (ctx->chgsize.absolute) ? ctx->chgsize.absolute : line->Thickness + ctx->chgsize.delta; + value = (ctx->chgsize.is_absolute) ? ctx->chgsize.value : line->Thickness + ctx->chgsize.value; if (value <= PCB_MAX_LINESIZE && value >= PCB_MIN_LINESIZE && value != line->Thickness) { pcb_undo_add_obj_to_size(PCB_TYPE_ELEMENT_LINE, Element, line, line); line->Thickness = value; @@ -1473,7 +1473,7 @@ PCB_END_LOOP; PCB_ARC_LOOP(Element); { - value = (ctx->chgsize.absolute) ? ctx->chgsize.absolute : arc->Thickness + ctx->chgsize.delta; + value = (ctx->chgsize.is_absolute) ? ctx->chgsize.value : arc->Thickness + ctx->chgsize.value; if (value <= PCB_MAX_LINESIZE && value >= PCB_MIN_LINESIZE && value != arc->Thickness) { pcb_undo_add_obj_to_size(PCB_TYPE_ELEMENT_ARC, Element, arc, arc); arc->Thickness = value; @@ -1492,8 +1492,8 @@ /* changes the scaling factor of a elementname object; returns pcb_true if changed */ void *pcb_elemop_change_name_size(pcb_opctx_t *ctx, pcb_element_t *Element) { - int value = ctx->chgsize.absolute ? PCB_COORD_TO_MIL(ctx->chgsize.absolute) - : PCB_ELEM_TEXT_DESCRIPTION(Element).Scale + PCB_COORD_TO_MIL(ctx->chgsize.delta); + int value = ctx->chgsize.is_absolute ? PCB_COORD_TO_MIL(ctx->chgsize.value) + : PCB_ELEM_TEXT_DESCRIPTION(Element).Scale + PCB_COORD_TO_MIL(ctx->chgsize.value); if (PCB_FLAG_TEST(PCB_FLAG_LOCK, &Element->Name[0])) return (NULL); Index: trunk/src/obj_line.c =================================================================== --- trunk/src/obj_line.c (revision 10806) +++ trunk/src/obj_line.c (revision 10807) @@ -340,7 +340,7 @@ /* changes the size of a line */ void *pcb_lineop_change_size(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line) { - pcb_coord_t value = (ctx->chgsize.absolute) ? ctx->chgsize.absolute : Line->Thickness + ctx->chgsize.delta; + pcb_coord_t value = (ctx->chgsize.is_absolute) ? ctx->chgsize.value : Line->Thickness + ctx->chgsize.value; if (PCB_FLAG_TEST(PCB_FLAG_LOCK, Line)) return (NULL); @@ -362,7 +362,7 @@ /*changes the clearance size of a line */ void *pcb_lineop_change_clear_size(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line) { - pcb_coord_t value = (ctx->chgsize.absolute) ? ctx->chgsize.absolute : Line->Clearance + ctx->chgsize.delta; + pcb_coord_t value = (ctx->chgsize.is_absolute) ? ctx->chgsize.value : Line->Clearance + ctx->chgsize.value; if (PCB_FLAG_TEST(PCB_FLAG_LOCK, Line) || !PCB_FLAG_TEST(PCB_FLAG_CLEARLINE, Line)) return (NULL); Index: trunk/src/obj_pad.c =================================================================== --- trunk/src/obj_pad.c (revision 10806) +++ trunk/src/obj_pad.c (revision 10807) @@ -261,7 +261,7 @@ /* changes the size of a pad */ void *pcb_padop_change_size(pcb_opctx_t *ctx, pcb_element_t *Element, pcb_pad_t *Pad) { - pcb_coord_t value = (ctx->chgsize.absolute) ? ctx->chgsize.absolute : Pad->Thickness + ctx->chgsize.delta; + pcb_coord_t value = (ctx->chgsize.is_absolute) ? ctx->chgsize.value : Pad->Thickness + ctx->chgsize.value; if (PCB_FLAG_TEST(PCB_FLAG_LOCK, Pad)) return (NULL); @@ -285,7 +285,7 @@ /* changes the clearance size of a pad */ void *pcb_padop_change_clear_size(pcb_opctx_t *ctx, pcb_element_t *Element, pcb_pad_t *Pad) { - pcb_coord_t value = (ctx->chgsize.absolute) ? ctx->chgsize.absolute : Pad->Clearance + ctx->chgsize.delta; + pcb_coord_t value = (ctx->chgsize.is_absolute) ? ctx->chgsize.value : Pad->Clearance + ctx->chgsize.value; if (PCB_FLAG_TEST(PCB_FLAG_LOCK, Pad)) return (NULL); @@ -293,9 +293,9 @@ value = 0; else value = MIN(PCB_MAX_LINESIZE, value); - if (ctx->chgsize.delta < 0 && value < PCB->Bloat * 2) + if (!ctx->chgsize.is_absolute && ctx->chgsize.value < 0 && value < PCB->Bloat * 2) value = 0; - if ((ctx->chgsize.delta > 0 || ctx->chgsize.absolute) && value < PCB->Bloat * 2) + if (ctx->chgsize.value > 0 && value < PCB->Bloat * 2) value = PCB->Bloat * 2 + 2; if (value == Pad->Clearance) return NULL; @@ -383,10 +383,10 @@ /* changes the mask size of a pad */ void *pcb_padop_change_mask_size(pcb_opctx_t *ctx, pcb_element_t *Element, pcb_pad_t *Pad) { - pcb_coord_t value = (ctx->chgsize.absolute) ? ctx->chgsize.absolute : Pad->Mask + ctx->chgsize.delta; + pcb_coord_t value = (ctx->chgsize.is_absolute) ? ctx->chgsize.value : Pad->Mask + ctx->chgsize.value; value = MAX(value, 0); - if (value == Pad->Mask && ctx->chgsize.absolute == 0) + if (value == Pad->Mask && ctx->chgsize.value == 0) value = Pad->Thickness; if (value != Pad->Mask) { pcb_undo_add_obj_to_mask_size(PCB_TYPE_PAD, Element, Pad, Pad); Index: trunk/src/obj_pinvia.c =================================================================== --- trunk/src/obj_pinvia.c (revision 10806) +++ trunk/src/obj_pinvia.c (revision 10807) @@ -411,7 +411,7 @@ /* changes the size of a via */ void *pcb_viaop_change_size(pcb_opctx_t *ctx, pcb_pin_t *Via) { - pcb_coord_t value = ctx->chgsize.absolute ? ctx->chgsize.absolute : Via->Thickness + ctx->chgsize.delta; + pcb_coord_t value = ctx->chgsize.is_absolute ? ctx->chgsize.value : Via->Thickness + ctx->chgsize.value; if (PCB_FLAG_TEST(PCB_FLAG_LOCK, Via)) return (NULL); @@ -438,7 +438,7 @@ /* changes the drilling hole of a via */ void *pcb_viaop_change_2nd_size(pcb_opctx_t *ctx, pcb_pin_t *Via) { - pcb_coord_t value = (ctx->chgsize.absolute) ? ctx->chgsize.absolute : Via->DrillingHole + ctx->chgsize.delta; + pcb_coord_t value = (ctx->chgsize.is_absolute) ? ctx->chgsize.value : Via->DrillingHole + ctx->chgsize.value; if (PCB_FLAG_TEST(PCB_FLAG_LOCK, Via)) return (NULL); @@ -463,7 +463,7 @@ /* changes the drilling hole of a pin */ void *pcb_pinop_change_2nd_size(pcb_opctx_t *ctx, pcb_element_t *Element, pcb_pin_t *Pin) { - pcb_coord_t value = (ctx->chgsize.absolute) ? ctx->chgsize.absolute : Pin->DrillingHole + ctx->chgsize.delta; + pcb_coord_t value = (ctx->chgsize.is_absolute) ? ctx->chgsize.value : Pin->DrillingHole + ctx->chgsize.value; if (PCB_FLAG_TEST(PCB_FLAG_LOCK, Pin)) return (NULL); @@ -489,7 +489,7 @@ /* changes the clearance size of a via */ void *pcb_viaop_change_clear_size(pcb_opctx_t *ctx, pcb_pin_t *Via) { - pcb_coord_t value = (ctx->chgsize.absolute) ? ctx->chgsize.absolute : Via->Clearance + ctx->chgsize.delta; + pcb_coord_t value = (ctx->chgsize.is_absolute) ? ctx->chgsize.value : Via->Clearance + ctx->chgsize.value; if (PCB_FLAG_TEST(PCB_FLAG_LOCK, Via)) return (NULL); @@ -496,9 +496,9 @@ if (value < 0) value = 0; value = MIN(PCB_MAX_LINESIZE, value); - if (ctx->chgsize.delta < 0 && value < PCB->Bloat * 2) + if (!ctx->chgsize.is_absolute && ctx->chgsize.value < 0 && value < PCB->Bloat * 2) value = 0; - if ((ctx->chgsize.delta > 0 || ctx->chgsize.absolute) && value < PCB->Bloat * 2) + if (ctx->chgsize.value > 0 && value < PCB->Bloat * 2) value = PCB->Bloat * 2 + 2; if (Via->Clearance == value) return NULL; @@ -519,7 +519,7 @@ /* changes the size of a pin */ void *pcb_pinop_change_size(pcb_opctx_t *ctx, pcb_element_t *Element, pcb_pin_t *Pin) { - pcb_coord_t value = (ctx->chgsize.absolute) ? ctx->chgsize.absolute : Pin->Thickness + ctx->chgsize.delta; + pcb_coord_t value = (ctx->chgsize.is_absolute) ? ctx->chgsize.value : Pin->Thickness + ctx->chgsize.value; if (PCB_FLAG_TEST(PCB_FLAG_LOCK, Pin)) return (NULL); @@ -544,7 +544,7 @@ /* changes the clearance size of a pin */ void *pcb_pinop_change_clear_size(pcb_opctx_t *ctx, pcb_element_t *Element, pcb_pin_t *Pin) { - pcb_coord_t value = (ctx->chgsize.absolute) ? ctx->chgsize.absolute : Pin->Clearance + ctx->chgsize.delta; + pcb_coord_t value = (ctx->chgsize.is_absolute) ? ctx->chgsize.value : Pin->Clearance + ctx->chgsize.value; if (PCB_FLAG_TEST(PCB_FLAG_LOCK, Pin)) return (NULL); @@ -551,9 +551,9 @@ if (value < 0) value = 0; value = MIN(PCB_MAX_LINESIZE, value); - if (ctx->chgsize.delta < 0 && value < PCB->Bloat * 2) + if (!ctx->chgsize.is_absolute && ctx->chgsize.value < 0 && value < PCB->Bloat * 2) value = 0; - if ((ctx->chgsize.delta > 0 || ctx->chgsize.absolute) && value < PCB->Bloat * 2) + if (ctx->chgsize.value > 0 && value < PCB->Bloat * 2) value = PCB->Bloat * 2 + 2; if (Pin->Clearance == value) return NULL; @@ -626,8 +626,8 @@ pcb_undo_add_obj_to_clear_poly(PCB_TYPE_VIA, NULL, Via, Via, pcb_false); pcb_poly_restore_to_poly(PCB->Data, PCB_TYPE_VIA, NULL, Via); pcb_undo_add_obj_to_flag(PCB_TYPE_VIA, NULL, Via, Via); - PCB_FLAG_SQUARE_ASSIGN(ctx->chgsize.absolute, Via); - if (ctx->chgsize.absolute == 0) + PCB_FLAG_SQUARE_ASSIGN(ctx->chgsize.value, Via); + if (ctx->chgsize.value == 0) PCB_FLAG_CLEAR(PCB_FLAG_SQUARE, Via); else PCB_FLAG_SET(PCB_FLAG_SQUARE, Via); @@ -647,8 +647,8 @@ pcb_undo_add_obj_to_clear_poly(PCB_TYPE_PIN, Element, Pin, Pin, pcb_false); pcb_poly_restore_to_poly(PCB->Data, PCB_TYPE_PIN, Element, Pin); pcb_undo_add_obj_to_flag(PCB_TYPE_PIN, Element, Pin, Pin); - PCB_FLAG_SQUARE_ASSIGN(ctx->chgsize.absolute, Pin); - if (ctx->chgsize.absolute == 0) + PCB_FLAG_SQUARE_ASSIGN(ctx->chgsize.value, Pin); + if (ctx->chgsize.value == 0) PCB_FLAG_CLEAR(PCB_FLAG_SQUARE, Pin); else PCB_FLAG_SET(PCB_FLAG_SQUARE, Pin); @@ -782,10 +782,10 @@ /* changes the mask size of a pin */ void *pcb_pinop_change_mask_size(pcb_opctx_t *ctx, pcb_element_t *Element, pcb_pin_t *Pin) { - pcb_coord_t value = (ctx->chgsize.absolute) ? ctx->chgsize.absolute : Pin->Mask + ctx->chgsize.delta; + pcb_coord_t value = (ctx->chgsize.is_absolute) ? ctx->chgsize.value : Pin->Mask + ctx->chgsize.value; value = MAX(value, 0); - if (value == Pin->Mask && ctx->chgsize.absolute == 0) + if (value == Pin->Mask && ctx->chgsize.value == 0) value = Pin->Thickness; if (value != Pin->Mask) { pcb_undo_add_obj_to_mask_size(PCB_TYPE_PIN, Element, Pin, Pin); @@ -804,7 +804,7 @@ { pcb_coord_t value; - value = (ctx->chgsize.absolute) ? ctx->chgsize.absolute : Via->Mask + ctx->chgsize.delta; + value = (ctx->chgsize.is_absolute) ? ctx->chgsize.value : Via->Mask + ctx->chgsize.value; value = MAX(value, 0); if (value != Via->Mask) { pcb_undo_add_obj_to_mask_size(PCB_TYPE_VIA, Via, Via, Via); Index: trunk/src/obj_text.c =================================================================== --- trunk/src/obj_text.c (revision 10806) +++ trunk/src/obj_text.c (revision 10807) @@ -304,8 +304,8 @@ /* changes the scaling factor of a text object */ void *pcb_textop_change_size(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text) { - int value = ctx->chgsize.absolute ? PCB_COORD_TO_MIL(ctx->chgsize.absolute) - : Text->Scale + PCB_COORD_TO_MIL(ctx->chgsize.delta); + int value = ctx->chgsize.is_absolute ? PCB_COORD_TO_MIL(ctx->chgsize.value) + : Text->Scale + PCB_COORD_TO_MIL(ctx->chgsize.value); if (PCB_FLAG_TEST(PCB_FLAG_LOCK, Text)) return (NULL); Index: trunk/src/operation.h =================================================================== --- trunk/src/operation.h (revision 10806) +++ trunk/src/operation.h (revision 10807) @@ -43,14 +43,15 @@ typedef struct { pcb_board_t *pcb; int is_primary; /* whether the primary parameter should be changed */ - pcb_coord_t delta; /* change of size */ - pcb_coord_t absolute; /* Absolute size */ + pcb_bool is_absolute; + pcb_coord_t value; /* delta or absolute (depending on is_absoulute) */ } pcb_opctx_chgsize_t; typedef struct { pcb_board_t *pcb; int is_primary; /* whether the primary parameter should be changed */ - pcb_angle_t delta, absolute; /* same as above, but for angles */ + pcb_bool is_absolute; + pcb_angle_t value; /* same as above, but for angles */ } pcb_opctx_chgangle_t; typedef struct {