diff --git a/interface/wx/control.h b/interface/wx/control.h index 785cbbf8bd..34d8a388a8 100644 --- a/interface/wx/control.h +++ b/interface/wx/control.h @@ -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. diff --git a/src/common/ctrlcmn.cpp b/src/common/ctrlcmn.cpp index dbfbc9f700..425b947b66 100644 --- a/src/common/ctrlcmn.cpp +++ b/src/common/ctrlcmn.cpp @@ -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