mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
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:
parent
b62cf45d59
commit
86f61a6664
1 changed files with 2 additions and 5 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue