From 86f61a666427167170dab4ae43f485cc2b908e9c Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Thu, 6 Aug 2015 11:59:52 -0300 Subject: Minor code cleanup. Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/starwidget.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'qt-ui') diff --git a/qt-ui/starwidget.cpp b/qt-ui/starwidget.cpp index 117eaf7ff..d959ed3b9 100644 --- a/qt-ui/starwidget.cpp +++ b/qt-ui/starwidget.cpp @@ -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); - } } } -- cgit v1.2.3-70-g09d2