Ticket #3363: KeyLocalContext.patch

File KeyLocalContext.patch, 1.0 KB (added by jppoet@…, 17 years ago)

Keybinding: Local context priority over jump points

  • libs/libmythui/mythmainwindow.cpp

     
    719719    actions.clear();
    720720    int keynum = d->TranslateKeyNum(e);
    721721
    722     if (allowJumps &&
    723         d->jumpMap.count(keynum) > 0 && d->exitmenucallback == NULL)
    724     {
    725         d->exitingtomain = true;
    726         d->exitmenucallback = d->jumpMap[keynum]->callback;
    727         QApplication::postEvent(this, new ExitToMainMenuEvent());
    728         return false;
    729     }
    730 
    731722    bool retval = false;
    732723
    733724    if (d->keyContexts[context])
     
    742733        retval = true;
    743734    }
    744735
     736    if (!retval && allowJumps &&
     737        d->jumpMap.count(keynum) > 0 && d->exitmenucallback == NULL)
     738    {
     739        d->exitingtomain = true;
     740        d->exitmenucallback = d->jumpMap[keynum]->callback;
     741        QApplication::postEvent(this, new ExitToMainMenuEvent());
     742        return false;
     743    }
     744
    745745    return retval;
    746746}
    747747