Fix wxTextWrapper::Wrap with widthMax=-1

Fix regression introduced in cb2474f where Wrap() stopped treating
negative widthMax as documented, i.e. not doing any wrapping at all and
only respecting newlines.
This commit is contained in:
Václav Slavík
2017-04-08 14:40:43 +02:00
committed by Václav Slavík
parent 3afc2790b8
commit 2132ff0291

View File

@@ -118,6 +118,13 @@ void wxTextWrapper::Wrap(wxWindow *win, const wxString& text, int widthMax)
OnNewLine();
}
// Is this a special case when wrapping is disabled?
if ( widthMax < 0 )
{
DoOutputLine(line);
continue;
}
for ( bool newLine = false; !line.empty(); newLine = true )
{
if ( newLine )