diff --git a/ChangeLog b/ChangeLog index d72258756..d3bbeda3e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2013-08-26 Doug Simons + + * GSLayoutManager.m: Changed _didInvalidateLayout to call [self + _invalidateLayoutFromContainer:0] to properly reset things. Otherwise + things were left in an inconsistent state internally (including layout_glyph + being beyond the new text length, which caused nasty exceptions). + 2013-08-08 Frank Le Grand Merged changes from Trunk (since rev 35219) to TestPlant branch. diff --git a/Source/GSLayoutManager.m b/Source/GSLayoutManager.m index a90ec2955..1c6f278f3 100644 --- a/Source/GSLayoutManager.m +++ b/Source/GSLayoutManager.m @@ -1854,6 +1854,7 @@ places where we switch. tc->num_linefrags = tc->num_soft = 0; tc->size_linefrags = 0; tc->pos = tc->length = 0; + // FIXME: This value never gets used: tc->was_invalidated = YES; } for (i = idx - 1, tc = textcontainers + idx - 1; i >= 0; i--, tc--) @@ -2056,14 +2057,7 @@ places where we switch. -(void) _didInvalidateLayout { - int i; - textcontainer_t *tc; - - for (tc = textcontainers, i = 0; i < num_textcontainers; i++, tc++) - { - // FIXME: This value never gets used - tc->was_invalidated = YES; - } + [self _invalidateLayoutFromContainer: 0]; } @end