Handle wxELLIPSIZE_NONE gracefully in wxControl::Ellipsize()
Since 44bcc3a723 wxRendererGeneric::DrawItemText()
could call Ellipsize() with wxELLIPSIZE_NONE mode, resulting in an assert.
Fix this by just not doing anything in this case.
Closes #125.
This commit is contained in:
committed by
Vadim Zeitlin
parent
1bb714b9df
commit
4e49638a6c
@@ -520,6 +520,9 @@ wxString wxControlBase::Ellipsize(const wxString& label, const wxDC& dc,
|
||||
wxEllipsizeMode mode, int maxFinalWidth,
|
||||
int flags)
|
||||
{
|
||||
if (mode == wxELLIPSIZE_NONE)
|
||||
return label;
|
||||
|
||||
wxString ret;
|
||||
|
||||
// these cannot be cached between different Ellipsize() calls as they can
|
||||
|
||||
Reference in New Issue
Block a user