Ticket #3570: allow_horizbuttonlist_to_use_buttonlist_xml_tag.diff

File allow_horizbuttonlist_to_use_buttonlist_xml_tag.diff, 1.5 KB (added by skamithi, 17 years ago)
  • libs/libmythui/mythlistbutton.cpp

     
    778778    MythListButton *lb = dynamic_cast<MythListButton *>(base);
    779779    if (!lb)
    780780    {
    781         VERBOSE(VB_IMPORTANT, "ERROR, bad parsing");
     781        VERBOSE(VB_IMPORTANT, QString("MythListButton CopyFrom ERR: "
     782                                        "Copy Failed "
     783                                        "base '%1' is not a mythlistbutton"
     784                                        .arg(base->name())));
    782785        return;
    783786    }
    784787
     
    928940    MythHorizListButton *hlb = dynamic_cast<MythHorizListButton *>(base);
    929941    if (!hlb)
    930942    {
    931         VERBOSE(VB_IMPORTANT, "ERROR, bad parsing");
    932         return;
     943        MythListButton *lb = dynamic_cast<MythListButton *>(base);
     944        if (!lb)
     945        {
     946            VERBOSE(VB_IMPORTANT, QString("MythHorizListButton CopyFrom ERR: "
     947                                        "Copy Failed "
     948                                        "base '%1' is not a mythlistbutton or "
     949                                        "mythhorizlistbutton")
     950                                        .arg(base->name()));
     951            return;
     952        }
    933953    }
    934954
    935955    MythListButton::CopyFrom(base);
    936956
    937     m_itemWidth = hlb->m_itemWidth;
     957    if (hlb)
     958        m_itemWidth = hlb->m_itemWidth;
    938959}
    939960
    940961//////////////////////////////////////////////////////////////////////////////