mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-14 15:24:07 +00:00
UI: Fix scene rename on tab and back tab
This commit is contained in:
parent
004253f296
commit
f5e77a4587
|
@ -10662,10 +10662,16 @@ bool SceneRenameDelegate::eventFilter(QObject *editor, QEvent *event)
|
|||
{
|
||||
if (event->type() == QEvent::KeyPress) {
|
||||
QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event);
|
||||
if (keyEvent->key() == Qt::Key_Escape) {
|
||||
switch (keyEvent->key()) {
|
||||
case Qt::Key_Escape: {
|
||||
QLineEdit *lineEdit = qobject_cast<QLineEdit *>(editor);
|
||||
if (lineEdit)
|
||||
lineEdit->undo();
|
||||
break;
|
||||
}
|
||||
case Qt::Key_Tab:
|
||||
case Qt::Key_Backtab:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue