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:
committed by
Václav Slavík
parent
3afc2790b8
commit
2132ff0291
@@ -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 )
|
||||
|
Reference in New Issue
Block a user