summaryrefslogtreecommitdiffstats
path: root/qt-ui/starwidget.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@gmail.com>2015-08-06 11:59:52 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-08-15 05:01:33 -0700
commit86f61a666427167170dab4ae43f485cc2b908e9c (patch)
tree6b131a87e32d171d435228add30c4417c9066816 /qt-ui/starwidget.cpp
parentb62cf45d59bc953ca074df4bdc2829bbff7010f5 (diff)
downloadsubsurface-86f61a666427167170dab4ae43f485cc2b908e9c.tar.gz
Minor code cleanup.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/starwidget.cpp')
-rw-r--r--qt-ui/starwidget.cpp7
1 files changed, 2 insertions, 5 deletions
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);
- }
}
}