mirror of
https://github.com/overte-org/overte.git
synced 2025-08-11 00:28:40 +02:00
Merge pull request #4533 from jherico/tr2
Fixing consecutive spaces issue with text renderer
This commit is contained in:
commit
e1da9331e3
1 changed files with 5 additions and 1 deletions
|
@ -359,8 +359,12 @@ void Font::setupGL() {
|
|||
// FIXME there has to be a cleaner way of doing this
|
||||
QStringList Font::tokenizeForWrapping(const QString & str) const {
|
||||
QStringList result;
|
||||
foreach(const QString & token1, str.split(" ", QString::SkipEmptyParts)) {
|
||||
foreach(const QString & token1, str.split(" ")) {
|
||||
bool lineFeed = false;
|
||||
if (token1.isEmpty()) {
|
||||
result << token1;
|
||||
continue;
|
||||
}
|
||||
foreach(const QString & token2, token1.split("\n")) {
|
||||
if (lineFeed) {
|
||||
result << "\n";
|
||||
|
|
Loading…
Reference in a new issue