diff options
author | Tomaz Canabrava <tomaz.canabrava@gmail.com> | 2015-08-06 11:59:52 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-08-15 05:01:33 -0700 |
commit | 86f61a666427167170dab4ae43f485cc2b908e9c (patch) | |
tree | 6b131a87e32d171d435228add30c4417c9066816 /qt-ui | |
parent | b62cf45d59bc953ca074df4bdc2829bbff7010f5 (diff) | |
download | subsurface-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')
-rw-r--r-- | qt-ui/starwidget.cpp | 7 |
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); - } } } |