mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 13:10:38 +00:00
Don't track the started status for a text container separately. Use num_linefrags instead.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16048 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
2a259e90d7
commit
3b7974675d
4 changed files with 18 additions and 12 deletions
|
@ -1447,7 +1447,7 @@ places where we switch.
|
|||
|
||||
for (i = idx, tc = textcontainers + idx; i < num_textcontainers; i++, tc++)
|
||||
{
|
||||
tc->started = tc->complete = NO;
|
||||
tc->complete = NO;
|
||||
if (tc->linefrags)
|
||||
{
|
||||
for (j = 0, lf = tc->linefrags; j < tc->num_linefrags + tc->num_soft; j++, lf++)
|
||||
|
@ -1468,7 +1468,7 @@ places where we switch.
|
|||
}
|
||||
for (i = idx - 1, tc = textcontainers + idx - 1; i >= 0; i--, tc--)
|
||||
{
|
||||
if (tc->started)
|
||||
if (tc->num_linefrags)
|
||||
{
|
||||
layout_glyph = tc->pos + tc->length;
|
||||
if (layout_glyph == glyphs->glyph_length)
|
||||
|
@ -1641,7 +1641,8 @@ by calling this incorrectly.
|
|||
return;
|
||||
}
|
||||
|
||||
if (tc->started)
|
||||
/* Assume that no line frags means that layout hasn't started yet. */
|
||||
if (tc->num_linefrags)
|
||||
{
|
||||
if (glyphRange.location != tc->pos + tc->length)
|
||||
{
|
||||
|
@ -1663,7 +1664,6 @@ by calling this incorrectly.
|
|||
}
|
||||
tc->pos = 0;
|
||||
tc->length = glyphRange.length;
|
||||
tc->started = YES;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1676,7 +1676,6 @@ by calling this incorrectly.
|
|||
}
|
||||
tc->pos = glyphRange.location;
|
||||
tc->length = glyphRange.length;
|
||||
tc->started = YES;
|
||||
}
|
||||
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue