[LYN-4393] As a dev I want to Enable Gems in O3DE.exe with Keyboard (#1760)

Enabling and disabling the selected gem is now possible by pressing the space bar.

Signed-off-by: Benjamin Jillich <jillich@amazon.com>
main
Benjamin Jillich 5 years ago committed by GitHub
parent 3c959832a3
commit 2a42e7a012
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -131,6 +131,17 @@ namespace O3DE::ProjectManager
return false; return false;
} }
if (event->type() == QEvent::KeyPress)
{
auto keyEvent = static_cast<const QKeyEvent*>(event);
if (keyEvent->key() == Qt::Key_Space)
{
const bool isAdded = GemModel::IsAdded(modelIndex);
GemModel::SetIsAdded(*model, modelIndex, !isAdded);
return true;
}
}
if (event->type() == QEvent::MouseButtonPress) if (event->type() == QEvent::MouseButtonPress)
{ {
QMouseEvent* mouseEvent = static_cast<QMouseEvent*>(event); QMouseEvent* mouseEvent = static_cast<QMouseEvent*>(event);

Loading…
Cancel
Save