Ticket #26: patch

File patch, 1.6 KB (added by lucas@…, 19 years ago)

fixes the problem in this way:

  • mythvideo/videotree.cpp

     
    7979        handled = true;
    8080
    8181        if (action == "SELECT")
    82             video_tree_list->select();
     82        {
     83            if (curitem)
     84                video_tree_list->select();
     85            else
     86                video_tree_list->pushDown();
     87        }
    8388        else if (action == "UP")
    8489            video_tree_list->moveUp();
    8590        else if (action == "DOWN")
     
    96101            doMenu(true);           
    97102        else if (action == "MENU")
    98103            doMenu(false);
     104        else if (action == "ESCAPE")
     105        {
     106            unsigned int distanceFromRoot=0;
     107            for (GenericTree* it = video_tree_list->getCurrentNode() ; it ; distanceFromRoot++)
     108               it = it->getParent();
    99109
     110            if (distanceFromRoot - video_tree_list->getActiveBin() >= 2)
     111                video_tree_list->popUp();
     112            else
     113                handled = false;
     114        }
     115
    100116        else if (action == "1" || action == "2" || action == "3" ||
    101117                 action == "4")
    102118        {
     
    106122            handled = false;
    107123    }
    108124
    109         if (!handled)
     125    if (!handled)
    110126    {
    111127   
    112128    gContext->GetMainWindow()->TranslateKeyPress("TV Frontend", e, actions);
     
    316332        //  (no video file here, just a directory)
    317333        //
    318334       
     335        curitem = NULL;
     336
    319337        video_title->SetText("");
    320338        video_file->SetText("");
    321339        video_player->SetText("");