Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Games
KPat
Commits
766f52a3
Commit
766f52a3
authored
Aug 31, 2020
by
Willyanto Willyanto
Browse files
Fix pressing alt+G and Enter/Return redeals current game
BUG: 408931
parent
93b72a36
Changes
2
Hide whitespace changes
Inline
Side-by-side
gameselectionscene.cpp
View file @
766f52a3
...
...
@@ -356,9 +356,14 @@ void GameSelectionScene::keyReleaseEvent( QKeyEvent * event )
++
m_selectionIndex
;
m_boxes
.
at
(
m_selectionIndex
)
->
setHighlighted
(
true
);
}
else
if
(
(
event
->
key
()
==
Qt
::
Key_Return
||
event
->
key
()
==
Qt
::
Key_Enter
||
event
->
key
()
==
Qt
::
Key_Space
)
}
void
GameSelectionScene
::
keyPressEvent
(
QKeyEvent
*
event
)
{
if
(
(
event
->
key
()
==
Qt
::
Key_Return
||
event
->
key
()
==
Qt
::
Key_Enter
||
event
->
key
()
==
Qt
::
Key_Space
)
&&
m_selectionIndex
!=
-
1
)
{
Q_EMIT
gameSelected
(
m_boxes
.
at
(
m_selectionIndex
)
->
id
()
);
...
...
gameselectionscene.h
View file @
766f52a3
...
...
@@ -39,6 +39,7 @@ Q_SIGNALS:
protected:
void
keyReleaseEvent
(
QKeyEvent
*
event
)
override
;
void
keyPressEvent
(
QKeyEvent
*
event
)
override
;
private
Q_SLOTS
:
void
boxHoverChanged
(
GameSelectionBox
*
box
,
bool
hovered
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment