Changeset 5368 for developers/werner/fped/inst.c
- Timestamp:
- 08/02/09 21:42:23 (4 years ago)
- File:
-
- 1 edited
-
developers/werner/fped/inst.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
developers/werner/fped/inst.c
r5367 r5368 183 183 184 184 185 static void rect_status(struct coord a, struct coord b )185 static void rect_status(struct coord a, struct coord b, unit_type width) 186 186 { 187 187 struct coord d = sub_vec(b, a); … … 198 198 } 199 199 status_set_r("r = %5.2f mm", hypot(units_to_mm(d.x), units_to_mm(d.y))); 200 if (width != -1) 201 status_set_name("width = %5.2f mm", units_to_mm(width)); 200 202 } 201 203 … … 269 271 { 270 272 status_set_name(self->vec->name ? self->vec->name : ""); 271 rect_status(self->base, self->u.rect.end );273 rect_status(self->base, self->u.rect.end, -1); 272 274 edit_unique_null(&self->vec->name, validate_vec_name, self->vec); 273 275 } … … 308 310 static void line_op_select(struct inst *self) 309 311 { 310 rect_status(self->bbox.min, self->bbox.max); 312 rect_status(self->bbox.min, self->bbox.max, self->u.rect.width); 313 edit_expr(&self->obj->u.line.width); 311 314 } 312 315 … … 347 350 static void rect_op_select(struct inst *self) 348 351 { 349 rect_status(self->bbox.min, self->bbox.max); 352 rect_status(self->bbox.min, self->bbox.max, self->u.rect.width); 353 edit_expr(&self->obj->u.rect.width); 350 354 } 351 355 … … 399 403 { 400 404 status_set_name(self->u.name); 401 rect_status(self->bbox.min, self->bbox.max );405 rect_status(self->bbox.min, self->bbox.max, -1); 402 406 edit_name(&self->obj->u.pad.name, validate_pad_name, NULL); 403 407 } … … 443 447 self->u.arc.a2-self->u.arc.a1); 444 448 status_set_r("r = %5.2f mm", units_to_mm(self->u.arc.r)); 449 status_set_name("width = %5.2f mm", units_to_mm(self->u.arc.width)); 450 edit_expr(&self->obj->u.arc.width); 445 451 } 446 452 … … 496 502 static void meas_op_select(struct inst *self) 497 503 { 498 rect_status(self->bbox.min, self->bbox.max); 504 rect_status(self->bbox.min, self->bbox.max, -1); 505 status_set_name("offset = %5.2f mm", units_to_mm(self->u.meas.offset)); 499 506 edit_expr(&self->obj->u.meas.offset); 500 507 }
Note: See TracChangeset
for help on using the changeset viewer.
