Skip to content

Commit

Permalink
Fixed handling of a series of \n in the text string so that the corre…
Browse files Browse the repository at this point in the history
…ct line spacing is maintained.
  • Loading branch information
robertosfield committed Feb 8, 2009
1 parent 12364b8 commit cf3f932
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/osgText/Text.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -491,18 +491,20 @@ void Text::computeGlyphRepresentation()

}
}

if (itr!=_text.end())
{
// skip over spaces and return.
while (*itr==' ') ++itr;
if (*itr=='\n') ++itr;
}

}
else
{
++itr;
}

if (itr!=_text.end())
{
// skip over spaces and return.
while (*itr==' ') ++itr;
if (*itr=='\n') ++itr;
}

// move to new line.
switch(_layout)
Expand Down

0 comments on commit cf3f932

Please sign in to comment.