Don't take trailing whitespace into account when ellipsizing

Trailing spaces and tabs are invisible, so the string shouldn't be
truncated (possibly losing some printable characters that could have
been displayed) just in order to show "..." instead of them.
This commit is contained in:
iwbnwif
2019-11-09 08:23:15 +00:00
committed by Vadim Zeitlin
parent cbda47ff15
commit 5cf745611b

View File

@@ -596,6 +596,7 @@ wxString wxControlBase::Ellipsize(const wxString& label, const wxDC& dc,
{
if ( pc == label.end() || *pc == wxS('\n') )
{
curLine.Trim();
curLine = DoEllipsizeSingleLine(curLine, dc, mode, maxFinalWidth,
replacementWidth, flags);