From 35cd2d1414568cf9eda6722732993e4563f387db Mon Sep 17 00:00:00 2001 From: jmarshallnz Date: Sat, 28 Aug 2010 04:43:11 +0000 Subject: fixed: Ensure ShortenPath is done at render time rather than during FrameMove, as it requires our scaling to be setup. Fixes #10003. git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@33255 568bbfeb-2a22-0410-94d2-cc84cf5bfa90 --- guilib/GUILabelControl.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'guilib/GUILabelControl.cpp') diff --git a/guilib/GUILabelControl.cpp b/guilib/GUILabelControl.cpp index 773db08da7..f7e53b3ce4 100644 --- a/guilib/GUILabelControl.cpp +++ b/guilib/GUILabelControl.cpp @@ -91,6 +91,8 @@ void CGUILabelControl::UpdateInfo(const CGUIListItem *item) label.Mid(m_startHighlight, m_endHighlight - m_startHighlight), (color_t)m_label.GetLabelInfo().disabledColor, label.Mid(m_endHighlight)); label = colorLabel; } + else if (m_bHasPath) + label = ShortenPath(label); m_label.SetMaxRect(m_posX, m_posY, m_width, m_height); m_label.SetText(label); @@ -112,11 +114,7 @@ bool CGUILabelControl::CanFocus() const void CGUILabelControl::SetLabel(const string &strLabel) { - // shorten the path label - if ( m_bHasPath ) - m_infoLabel.SetLabel(ShortenPath(strLabel), ""); - else // parse the label for info tags - m_infoLabel.SetLabel(strLabel, ""); + m_infoLabel.SetLabel(strLabel, ""); if (m_iCursorPos > (int)strLabel.size()) m_iCursorPos = strLabel.size(); } -- cgit v1.2.3