Ticket #10145: retain-group-position.patch

File retain-group-position.patch, 1.3 KB (added by Roger Siddons <dizygotheca@…>, 7 years ago)
  • mythtv/programs/mythfrontend/viewscheduled.cpp

    diff --git a/mythtv/programs/mythfrontend/viewscheduled.cpp b/mythtv/programs/mythfrontend/viewscheduled.cpp
    index 5fa0261..640d565 100644
    a b void ViewScheduled::LoadList(bool useExistingData) 
    238238
    239239    QString callsign;
    240240    QDateTime startts, recstartts;
     241    QDate group = m_currentGroup;
    241242
    242243    if (currentItem)
    243244    {
    void ViewScheduled::LoadList(bool useExistingData) 
    322323                                     qVariantFromValue(dateit.key()));
    323324            ++dateit;
    324325        }
    325         if (!m_recgroupList.contains(m_currentGroup))
    326             m_groupList->SetValueByData(qVariantFromValue(m_currentGroup));
     326
     327        // Restore group
     328        if (m_recgroupList.contains(group))
     329            m_currentGroup = group;
     330        else
     331            m_currentGroup = m_defaultGroup;
     332
     333        m_groupList->SetValueByData(qVariantFromValue(m_currentGroup));
    327334    }
    328335
    329336    FillList();
    void ViewScheduled::LoadList(bool useExistingData) 
    333340    {
    334341        ProgramList plist;
    335342
    336         if (!m_recgroupList.contains(m_currentGroup))
    337             m_currentGroup = m_defaultGroup;
    338 
    339343        plist = m_recgroupList[m_currentGroup];
    340344
    341345        int listPos = ((int) plist.size()) - 1;