Skip to content

Commit

Permalink
[guilib] only set label/label2 in case it changed
Browse files Browse the repository at this point in the history
  • Loading branch information
mkortstiege committed Aug 1, 2015
1 parent 9fee009 commit 71eb0f7
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions xbmc/guilib/GUIButtonControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,14 +266,20 @@ void CGUIButtonControl::SetInvalid()

void CGUIButtonControl::SetLabel(const string &label)
{ // NOTE: No fallback for buttons at this point
m_info.SetLabel(label, "", GetParentID());
SetInvalid();
if (m_info.GetLabel(GetParentID(), false) != label)
{
m_info.SetLabel(label, "", GetParentID());
SetInvalid();
}
}

void CGUIButtonControl::SetLabel2(const string &label2)
{ // NOTE: No fallback for buttons at this point
m_info2.SetLabel(label2, "", GetParentID());
SetInvalid();
if (m_info2.GetLabel(GetParentID(), false) != label2)
{
m_info2.SetLabel(label2, "", GetParentID());
SetInvalid();
}
}

void CGUIButtonControl::SetPosition(float posX, float posY)
Expand Down

0 comments on commit 71eb0f7

Please sign in to comment.