mirror of
https://github.com/overte-org/overte.git
synced 2025-04-22 11:53:28 +02:00
Merge pull request #2941 from binaryking/disable_keyevents_RSD
remove all key bindings from the running scripts dialog
This commit is contained in:
commit
669cafbe24
2 changed files with 6 additions and 30 deletions
|
@ -106,36 +106,12 @@ void RunningScriptsWidget::setRunningScripts(const QStringList& list) {
|
|||
createRecentlyLoadedScriptsTable();
|
||||
}
|
||||
|
||||
void RunningScriptsWidget::keyPressEvent(QKeyEvent* event)
|
||||
{
|
||||
int loadScriptNumber = -1;
|
||||
switch(event->key()) {
|
||||
case Qt::Key_Escape:
|
||||
Application::getInstance()->toggleRunningScriptsWidget();
|
||||
break;
|
||||
|
||||
case Qt::Key_1:
|
||||
case Qt::Key_2:
|
||||
case Qt::Key_3:
|
||||
case Qt::Key_4:
|
||||
case Qt::Key_5:
|
||||
case Qt::Key_6:
|
||||
case Qt::Key_7:
|
||||
case Qt::Key_8:
|
||||
case Qt::Key_9:
|
||||
loadScriptNumber = event->key() - Qt::Key_1;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
void RunningScriptsWidget::keyPressEvent(QKeyEvent *keyEvent) {
|
||||
if (keyEvent->key() == Qt::Key_Escape) {
|
||||
return;
|
||||
} else {
|
||||
FramelessDialog::keyPressEvent(keyEvent);
|
||||
}
|
||||
if (loadScriptNumber >= 0) {
|
||||
if (_recentlyLoadedScripts.size() > loadScriptNumber) {
|
||||
Application::getInstance()->loadScript(_recentlyLoadedScripts.at(loadScriptNumber));
|
||||
}
|
||||
}
|
||||
|
||||
FramelessDialog::keyPressEvent(event);
|
||||
}
|
||||
|
||||
void RunningScriptsWidget::paintEvent(QPaintEvent* event) {
|
||||
|
|
|
@ -143,7 +143,7 @@ font: bold 14pt;</string>
|
|||
font-size: 14pt;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>(click a script or use the 1-9 keys to load and run it)</string>
|
||||
<string>(click a script to load and run it)</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
|
|
Loading…
Reference in a new issue