common: finally spot the text size bug

GetBestWrappedSize (hence the BestSize) computes the size of
the wrapped text based on box side minus padding.

So the width of the widget is already the good size for text wrapping
This commit is contained in:
Gregory Hainaut 2016-11-11 09:23:36 +01:00
parent 4ee942aba2
commit 9c598fcd01
1 changed files with 0 additions and 1 deletions

View File

@ -228,7 +228,6 @@ bool pxStaticText::_updateWrapping(bool textChanged)
wxString wrappedLabel;
int newWidth = GetSize().GetWidth();
newWidth -= (int)(newWidth * m_paddingPct_horiz * 2) + (m_paddingPix_horiz * 2);
if (!textChanged && (newWidth == m_wrappedWidth))
return false;