Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

reset initial visible state to visible if it has been set to delayed …

…during a previous window session. fixes #13923
  • Loading branch information...
commit 60b0ee01a47a134a002594ab746b2e52efb0d2b7 1 parent a4ee831
Jonathan Marshall authored
Showing with 10 additions and 8 deletions.
  1. +10 −8 xbmc/guilib/GUIControl.cpp
View
18 xbmc/guilib/GUIControl.cpp
@@ -32,7 +32,7 @@ using namespace std;
CGUIControl::CGUIControl()
{
- m_hasRendered = false;
+ m_hasProcessed = false;
m_bHasFocus = false;
m_controlID = 0;
m_parentID = 0;
@@ -77,7 +77,7 @@ CGUIControl::CGUIControl(int parentID, int controlID, float posX, float posY, fl
ControlType = GUICONTROL_UNKNOWN;
m_bInvalidated = true;
m_bAllocated=false;
- m_hasRendered = false;
+ m_hasProcessed = false;
m_parentControl = NULL;
m_hasCamera = false;
m_pushedUpdates = false;
@@ -93,7 +93,7 @@ CGUIControl::~CGUIControl(void)
void CGUIControl::AllocResources()
{
- m_hasRendered = false;
+ m_hasProcessed = false;
m_bInvalidated = true;
m_bAllocated=true;
}
@@ -113,7 +113,7 @@ void CGUIControl::FreeResources(bool immediately)
}
m_bAllocated=false;
}
- m_hasRendered = false;
+ m_hasProcessed = false;
}
void CGUIControl::DynamicResourceAlloc(bool bOnOff)
@@ -162,6 +162,7 @@ void CGUIControl::Process(unsigned int currentTime, CDirtyRegionList &dirtyregio
{
// update our render region
m_renderRegion = g_graphicsContext.generateAABB(CalcRenderRegion());
+ m_hasProcessed = true;
}
// the main render routine.
@@ -186,7 +187,6 @@ void CGUIControl::DoRender()
void CGUIControl::Render()
{
- m_hasRendered = true;
}
bool CGUIControl::OnAction(const CAction &action)
@@ -649,6 +649,8 @@ void CGUIControl::SetInitialVisibility()
m_visible = m_visibleFromSkinCondition ? VISIBLE : HIDDEN;
// CLog::Log(LOGDEBUG, "Set initial visibility for control %i: %s", m_controlID, m_visible == VISIBLE ? "visible" : "hidden");
}
+ else if (m_visible == DELAYED)
+ m_visible = VISIBLE;
// and handle animation conditions as well
for (unsigned int i = 0; i < m_animations.size(); i++)
{
@@ -707,8 +709,8 @@ void CGUIControl::ResetAnimations()
bool CGUIControl::CheckAnimation(ANIMATION_TYPE animType)
{
// rule out the animations we shouldn't perform
- if (!IsVisible() || !HasRendered())
- { // hidden or never rendered - don't allow exit or entry animations for this control
+ if (!IsVisible() || !HasProcessed())
+ { // hidden or never processed - don't allow exit or entry animations for this control
if (animType == ANIM_TYPE_WINDOW_CLOSE)
{ // could be animating a (delayed) window open anim, so reset it
ResetAnimation(ANIM_TYPE_WINDOW_OPEN);
@@ -847,7 +849,7 @@ bool CGUIControl::Animate(unsigned int currentTime)
for (unsigned int i = 0; i < m_animations.size(); i++)
{
CAnimation &anim = m_animations[i];
- anim.Animate(currentTime, HasRendered() || visible == DELAYED);
+ anim.Animate(currentTime, HasProcessed() || visible == DELAYED);
// Update the control states (such as visibility)
UpdateStates(anim.GetType(), anim.GetProcess(), anim.GetState());
// and render the animation effect
Please sign in to comment.
Something went wrong with that request. Please try again.