Changeset 14197


Ignore:
Timestamp:
Sep 8, 2013, 7:07:31 PM (8 years ago)
Author:
jordan
Message:

(trunk, qt) #5312 'download checkbox toggle with spacebar is broken' -- fixed, patch by mikedld

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/qt/file-tree.cc

    r14196 r14197  
    10041004    }
    10051005
     1006  // handle using the keyboard to toggle the
     1007  // wanted/unwanted state or the file priority
     1008  else if (event->type () == QEvent::KeyPress && state () != EditingState)
     1009    {
     1010      switch (static_cast<QKeyEvent*> (event)->key ())
     1011        {
     1012        case Qt::Key_Space:
     1013          foreach (const QModelIndex& i, selectionModel ()->selectedRows (COL_WANTED))
     1014            clicked (i);
     1015          break;
     1016
     1017        case Qt::Key_Enter:
     1018        case Qt::Key_Return:
     1019          foreach (const QModelIndex& i, selectionModel ()->selectedRows (COL_PRIORITY))
     1020            clicked (i);
     1021          break;
     1022        }
     1023    }
     1024
    10061025  return false;
    10071026}
Note: See TracChangeset for help on using the changeset viewer.