Permalink
Browse files

Backport [27302] from trunk

Fixes non-animated GIF reloading in MythUIImage



git-svn-id: http://svn.mythtv.org/svn/branches/release-0-24-fixes@27303 7dbf422c-18fa-0310-86e9-fd20926502f2
  • Loading branch information...
1 parent da47d2e commit e8c6c19862ca9b96159a85e2c30158298325888a @Beirdo Beirdo committed Nov 20, 2010
Showing with 14 additions and 2 deletions.
  1. +14 −2 mythtv/libs/libmythui/mythuiimage.cpp
View
16 mythtv/libs/libmythui/mythuiimage.cpp
@@ -210,6 +210,12 @@ void MythUIImage::Clear(void)
m_Images.remove(it.key());
}
m_Delays.clear();
+ if (m_animatedImage)
+ {
+ m_LowNum = 0;
+ m_HighNum = 0;
+ m_animatedImage = false;
+ }
}
/**
@@ -221,7 +227,12 @@ void MythUIImage::Reset(void)
if (m_Filename != m_OrigFilename)
{
m_Filename = m_OrigFilename;
- m_animatedImage = false;
+ if (m_animatedImage)
+ {
+ m_LowNum = 0;
+ m_HighNum = 0;
+ m_animatedImage = false;
+ }
d->m_UpdateLock.unlock();
Load();
}
@@ -626,7 +637,8 @@ bool MythUIImage::Load(bool allowLoadInBackground, bool forceStat)
int j = 0;
for (int i = m_LowNum; i <= m_HighNum && !m_animatedImage; i++)
{
- if (!m_animatedImage && m_HighNum >= 1)
+ if (!m_animatedImage && m_HighNum != m_LowNum &&
+ bFilename.contains("%1"))
filename = bFilename.arg(i);
imagelabel = GenImageLabel(filename, w, h);

0 comments on commit e8c6c19

Please sign in to comment.