Permalink
Browse files

Don't display the new button state until we've finished populating it

with the new values. Fixes another visual irritation.

Refs #11717
  • Loading branch information...
stuartm committed Aug 2, 2013
1 parent 367fda1 commit c8e339f4e720ac7028a98c3a43c06a30cf51efb1
Showing with 6 additions and 7 deletions.
  1. +6 −7 mythtv/libs/libmythui/mythuibuttonlist.cpp
@@ -3383,14 +3383,11 @@ void MythUIButtonListItem::SetToRealButton(MythUIStateType *button, bool selecte
else
state = m_parent->m_active ? "active" : "inactive";
if (!button->DisplayState(state) && state == "inactive")
{
if (state == "inactive" && !button->GetState(state))
state = "active";
button->DisplayState(state);
}
MythUIGroup *buttonstate = dynamic_cast<MythUIGroup *>
(button->GetCurrentState());
(button->GetState(state));
if (!buttonstate)
{
@@ -3399,8 +3396,6 @@ void MythUIButtonListItem::SetToRealButton(MythUIStateType *button, bool selecte
return;
}
buttonstate->SetVisible(true);
// We want to reset everything in the button EXCEPT for the widgets which
// are about to be assigned new values. This is more efficient than
// resetting everything and more importantly it prevent flashing of images
@@ -3571,6 +3566,10 @@ void MythUIButtonListItem::SetToRealButton(MythUIStateType *button, bool selecte
++state_it;
}
// There is no need to check the return value here, since we already
// checked that the state exists with GetState() earlier
button->DisplayState(state);
}
//---------------------------------------------------------

0 comments on commit c8e339f

Please sign in to comment.