Minor code cleanup.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2015-08-06 11:59:52 -03:00 committed by Dirk Hohndel
parent b62cf45d59
commit 86f61a6664

View file

@ -152,16 +152,13 @@ void StarWidget::focusOutEvent(QFocusEvent *event)
QWidget::focusOutEvent(event);
}
void StarWidget::keyPressEvent(QKeyEvent *event)
{
if (event->key() == Qt::Key_Up || event->key() == Qt::Key_Right) {
if (currentStars() < TOTALSTARS) {
if (currentStars() < TOTALSTARS)
setCurrentStars(currentStars() + 1);
}
} else if (event->key() == Qt::Key_Down || event->key() == Qt::Key_Left) {
if (currentStars() > 0) {
if (currentStars() > 0)
setCurrentStars(currentStars() - 1);
}
}
}