[qt] Pass '[' and ']' keys to search console

Closes: #526
pull/617/head
Hleb Valoshka 2020-02-15 15:04:22 +03:00
parent 8376232f1c
commit e625496059
1 changed files with 9 additions and 0 deletions

View File

@ -377,6 +377,15 @@ void CelestiaActions::slotAdjustLimitingMagnitude()
QAction* act = qobject_cast<QAction*>(sender());
if (act != nullptr)
{
// HACK!HACK!HACK!
// Consider removal relevant entries from menus.
// If search console is open then pass keys to it.
if (appCore->getTextEnterMode() != CelestiaCore::KbNormal)
{
appCore->charEntered(act->shortcut().toString().toUtf8().data());
return;
}
Renderer* renderer = appCore->getRenderer();
float change = (float) act->data().toDouble();