Ticket #1894: browseicons.2.patch

File browseicons.2.patch, 1.6 KB (added by mythtv@…, 19 years ago)

Updated patch for post r10358

  • libs/libmythtv/osdtypes.cpp

     
    12541254{
    12551255    QString ckey;
    12561256
    1257     if (usecache)
    1258     {   
    1259         if (!filename.isEmpty() && filename.length() >= 2)
    1260             ckey = OSDImageCache::CreateKey(filename, wmult, hmult,
    1261                                             scalew, scaleh);
    1262         else
    1263             return; // this method requires a backing file
    1264     }
     1257    m_isvalid = false;
    12651258
    12661259    // Discard any in-cache items..
    12671260    if (m_cacheitem && !usecache)
     
    12771270        if (m_alpha)
    12781271            delete [] m_alpha;
    12791272        m_alpha = NULL;
    1280 
    1281         m_isvalid = false;
    12821273    }
    12831274
     1275    if (filename.isEmpty() || filename.length() < 2)
     1276        return;
     1277
    12841278    if (usecache)
    12851279    {
     1280        ckey = OSDImageCache::CreateKey(filename, wmult, hmult, scalew, scaleh);
     1281
    12861282        // Get the item from the cache so it's not freed while in use
    12871283        OSDImageCacheValue *value = c_cache.Get(ckey, true);
    12881284 
     
    12951291            m_alpha     = value->m_alpha;
    12961292            m_imagesize = value->m_imagesize;
    12971293            m_isvalid   = true;
     1294            m_filename  = filename;
    12981295
    12991296            // Put the old image back to the cache so it can be reused in the
    13001297            // future, and possibly freed by the cache system if the size limit
     
    13331330    QImage tmp2 = tmpimage.smoothScale(imwidth, imheight);
    13341331
    13351332    m_isvalid = true;
     1333    m_filename = filename;
    13361334
    13371335    m_yuv = new unsigned char[imwidth * imheight * 3 / 2];
    13381336    m_ybuffer = m_yuv;