Due to an off by 1 error in wxString::Mid() call, the size computed was too
small and hence the label could have been not displayed at all.
Fix this and also replace Mid(0, n) with a more clear Left(n) call.
Closes #14566.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72348
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
if(wxRibbonCanLabelBreakAtPosition(label, i))
{
int width = wxMax(
- dc.GetTextExtent(label.Mid(0, i - 1)).GetWidth(),
+ dc.GetTextExtent(label.Left(i)).GetWidth(),
dc.GetTextExtent(label.Mid(i + 1)).GetWidth() + last_line_extra_width);
if(width < best_width)
{