mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-04-23 07:59:23 -04:00
UI: Fix scene rename on tab and back tab
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user