Ticket #13318: 20180905_1816_ticket13318.patch

File 20180905_1816_ticket13318.patch, 720 bytes (added by Peter Bennett, 6 years ago)

Proposed fix - Only display the entry dialog if the spin box contains a numeric value. Otherwise pass the keystroke on.

  • mythtv/libs/libmythui/mythuispinbox.cpp

    diff --git a/mythtv/libs/libmythui/mythuispinbox.cpp b/mythtv/libs/libmythui/mythuispinbox.cpp
    index 0e0209fa245..0fffe14a1b5 100644
    a b bool MythUISpinBox::keyPressEvent(QKeyEvent *event) 
    227227
    228228    QString initialEntry = GetItemCurrent()->GetText();
    229229    bool doEntry = false;
     230
     231    // Only invoke the entry dialog if the entry is a number
     232    bool isNumber = false;
     233    (void)initialEntry.toLongLong(&isNumber,10);
     234    if (!isNumber)
     235        return MythUIButtonList::keyPressEvent(event);
     236
    230237    for (int i = 0; i < actions.size(); ++i)
    231238    {
    232239        if (actions[i] >= ACTION_0 && actions[i] <= ACTION_9)