作図ソフト dia の改良版
Revision | 513964533a41a0ba0d5b71b33f5e37ec52b42b3b (tree) |
---|---|
Zeit | 2014-09-14 21:12:34 |
Autor | Hans Breuer <hans@breu...> |
Commiter | Hans Breuer |
Fix typos and document potential side-effect of DiaObject::move()
The recent crash with "UML - Component Feature" could have been avoided by
using the trik to make an object update it's data. With the test this is
not wanted. Ideally we would not need that trick anywhere.
@@ -202,7 +202,7 @@ WriteRecHead(WpgRenderer *renderer, WPG_Type Type, guint32 Size) | ||
202 | 202 | rh.Dummy = 0xFF; |
203 | 203 | rh.Size = Size; |
204 | 204 | |
205 | - /* To avoid problems with stucture packing this struct | |
205 | + /* To avoid problems with structure packing this struct | |
206 | 206 | * is written in parts ... |
207 | 207 | */ |
208 | 208 | fwrite(&rh, sizeof(guint8), 2, renderer->file); |
@@ -727,7 +727,7 @@ draw_bezier(DiaRenderer *self, | ||
727 | 727 | |
728 | 728 | /* WPG's Poly Curve is a cubic bezier compatible with Dia's bezier. |
729 | 729 | * http://www.fileformat.info/format/wpg/egff.htm |
730 | - * could lead to the assumption of ony quadratic bezier support, | |
730 | + * could lead to the assumption of only quadratic bezier support, | |
731 | 731 | * but that's not the case. |
732 | 732 | */ |
733 | 733 | pts[0].x = SCX( points[0].p1.x); |
@@ -433,7 +433,7 @@ _test_connectionpoint_consistency (gconstpointer user_data) | ||
433 | 433 | * - the main point should be within the object, which can't work for |
434 | 434 | * an object consisting of only lines ... |
435 | 435 | * - some main points where just placed automatically and got fixed |
436 | - * after idntified with this check | |
436 | + * after identified with this check | |
437 | 437 | */ |
438 | 438 | if ( strcmp (type->name, "chemeng - coil") == 0 |
439 | 439 | || strcmp (type->name, "chemeng - coilv") == 0 |
@@ -564,6 +564,17 @@ _test_object_menu (gconstpointer user_data) | ||
564 | 564 | * The object parameter is deprecated, but still necessary! |
565 | 565 | */ |
566 | 566 | (change->revert)(change, o); |
567 | +#if 0 | |
568 | + /* XXX: Even more needs to be done to keep sane objects, see object_change_revert() | |
569 | + * in app/undo.c. AFAICT this is only needed to compensate for orthconn_set_points() | |
570 | + * while that does not update the object itself. | |
571 | + */ | |
572 | + { | |
573 | + /* Make sure object updates its data: */ | |
574 | + Point p = o->position; | |
575 | + (o->ops->move)(o,&p); | |
576 | + } | |
577 | +#endif | |
567 | 578 | _object_change_free(change); |
568 | 579 | } |
569 | 580 | } |