mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Fix line breaking thinko with Qt4
The test on whether to keep trailing spaces was inverted.
This commit is contained in:
parent
93066f13a5
commit
f2f0b30222
@ -603,7 +603,7 @@ GuiFontMetrics::breakString_helper(docstring const & s, int first_wid, int wid,
|
|||||||
// FIXME: this is slower than it could be but we'll get rid of Qt4 anyway
|
// FIXME: this is slower than it could be but we'll get rid of Qt4 anyway
|
||||||
docstring const ss = s.substr(pos, epos - pos);
|
docstring const ss = s.substr(pos, epos - pos);
|
||||||
int const wid = width(ss);
|
int const wid = width(ss);
|
||||||
int const nspc_wid = i + 1 < tl.lineCount() ? wid : width(rtrim(ss));
|
int const nspc_wid = i + 1 < tl.lineCount() ? width(rtrim(ss)) : wid;
|
||||||
#endif
|
#endif
|
||||||
breaks.emplace_back(epos - pos, wid, nspc_wid);
|
breaks.emplace_back(epos - pos, wid, nspc_wid);
|
||||||
pos = epos;
|
pos = epos;
|
||||||
|
Loading…
Reference in New Issue
Block a user