mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 09:35:28 +00:00
Hack to prevent newlines at the end of books possibly creating unnecessary pages for mygui versions lower than 3.2.2
This commit is contained in:
parent
f87d7c3fce
commit
608e1518a5
@ -197,6 +197,18 @@ namespace MWGui
|
||||
if (plainText[plainText.size()-1] == '\n')
|
||||
plainText.erase(plainText.end()-1);
|
||||
|
||||
#if (MYGUI_VERSION < MYGUI_DEFINE_VERSION(3, 2, 2))
|
||||
// splitting won't be fully functional until 3.2.2 (see TextElement::pageSplit())
|
||||
// hack: prevent newlines at the end of the book possibly creating unnecessary pages
|
||||
if (event == BookTextParser::Event_EOF)
|
||||
{
|
||||
while (plainText[plainText.size()-1] == '\n')
|
||||
{
|
||||
plainText.erase(plainText.end()-1);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
TextElement elem(paper, pag, mTextStyle, plainText);
|
||||
elem.paginate();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user