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:
Wacek Gocki
2015-11-03 22:27:08 +01:00
committed by Vadim Zeitlin
parent 1bb714b9df
commit 4e49638a6c
2 changed files with 5 additions and 1 deletions

View File

@@ -383,7 +383,8 @@ public: // static functions
wxDC::GetPartialTextExtents() function.
@param mode
The ellipsization mode. This is the setting which determines
which part of the string should be replaced by the ellipsis.
which part of the string should be replaced by the ellipsis
(unless it is ::wxELLIPSIZE_NONE in which case nothing is done).
See ::wxEllipsizeMode enumeration values for more info.
@param maxWidth
The maximum width of the returned string in pixels.