On Mac OS X, we shouldn't transmit the event to search box when backspace is pressed, but accept it (this should result in deleting the track from the view). Updates issue 1710

This commit is contained in:
Arnaud Bienner 2011-04-19 23:56:18 +00:00
parent 41a4393b24
commit 096c563a9c
1 changed files with 3 additions and 1 deletions

View File

@ -455,7 +455,9 @@ void PlaylistView::keyPressEvent(QKeyEvent* event) {
} else if(event->modifiers() == Qt::NoModifier // No modifier keys currently pressed...
// ... and key pressed is something related to text
&& ( (event->key() >= Qt::Key_A && event->key() <= Qt::Key_Z)
|| event->key() == Qt::Key_Backspace
#ifndef Q_OS_MAC
|| event->key() == Qt::Key_Backspace // On Mac OS, it should be used to remove tracks
#endif
|| event->key() == Qt::Key_Escape)) {
emit FocusOnFilterSignal(event);
event->accept();