Implement left-right navigation in GuiCitation

This commit is contained in:
Guillaume Munch 2017-02-26 22:15:50 +01:00
parent 26b2cc89d3
commit e6180e9914

View File

@ -402,6 +402,12 @@ bool GuiSelectionManager::eventFilter(QObject * obj, QEvent * event)
event->accept();
return true;
}
else if (keyPressed == Qt::Key_Right) {
selectedLV->setFocus();
selectedLV->setCurrentIndex(selectedLV->currentIndex());
event->accept();
return true;
}
} else if (etype == QEvent::FocusIn) {
if (selectedHasFocus_) {
selectedHasFocus_ = false;
@ -445,6 +451,12 @@ bool GuiSelectionManager::eventFilter(QObject * obj, QEvent * event)
return true;
}
}
else if (keyPressed == Qt::Key_Left) {
availableLV->setFocus();
availableLV->setCurrentIndex(availableLV->currentIndex());
event->accept();
return true;
}
} else if (etype == QEvent::FocusIn) {
if (!selectedHasFocus_) {
selectedHasFocus_ = true;