Revert "UI: Disable hotkeys when a user is expected to type text"
This reverts commit f832d14220
.
Reverting this until we do more investigation. Currently, any text
that can be typed in a dialog requires the dialog to re-enable hotkeys
on destruction, which is frustrating. There has to be a better way.
master
parent
1df2789978
commit
da04907927
|
@ -376,7 +376,6 @@ void SourceTreeItem::EnterEditMode()
|
|||
editor->installEventFilter(this);
|
||||
boxLayout->insertWidget(index, editor);
|
||||
setFocusProxy(editor);
|
||||
App()->DisableHotkeys();
|
||||
}
|
||||
|
||||
void SourceTreeItem::ExitEditMode(bool save)
|
||||
|
@ -416,7 +415,6 @@ void SourceTreeItem::ExitEditModeInternal(bool save)
|
|||
setFocusPolicy(Qt::NoFocus);
|
||||
boxLayout->insertWidget(index, label);
|
||||
label->setFocus();
|
||||
App()->UpdateHotkeyFocusSetting();
|
||||
|
||||
/* ----------------------------------------- */
|
||||
/* check for empty string */
|
||||
|
|
|
@ -936,7 +936,6 @@ void OBSBasicFilters::EditItem(QListWidgetItem *item, bool async)
|
|||
list->editItem(item);
|
||||
item->setFlags(flags);
|
||||
editActive = true;
|
||||
App()->DisableHotkeys();
|
||||
}
|
||||
|
||||
void OBSBasicFilters::DuplicateItem(QListWidgetItem *item)
|
||||
|
@ -1108,7 +1107,6 @@ void OBSBasicFilters::FilterNameEdited(QWidget *editor, QListWidget *list)
|
|||
listItem->setText(QString());
|
||||
SetupVisibilityItem(list, listItem, filter);
|
||||
editActive = false;
|
||||
App()->UpdateHotkeyFocusSetting();
|
||||
}
|
||||
|
||||
void OBSBasicFilters::AsyncFilterNameEdited(
|
||||
|
|
|
@ -67,7 +67,6 @@ OBSBasicInteraction::OBSBasicInteraction(QWidget *parent, OBSSource source_)
|
|||
};
|
||||
|
||||
connect(ui->preview, &OBSQTDisplay::DisplayCreated, addDrawCallback);
|
||||
App()->DisableHotkeys();
|
||||
}
|
||||
|
||||
OBSBasicInteraction::~OBSBasicInteraction()
|
||||
|
@ -75,7 +74,6 @@ OBSBasicInteraction::~OBSBasicInteraction()
|
|||
// since QT fakes a mouse movement while destructing a widget
|
||||
// remove our event filter
|
||||
ui->preview->removeEventFilter(eventFilter.get());
|
||||
App()->UpdateHotkeyFocusSetting();
|
||||
}
|
||||
|
||||
OBSEventFilter *OBSBasicInteraction::BuildEventFilter()
|
||||
|
|
|
@ -4831,7 +4831,6 @@ void OBSBasic::on_scenes_currentItemChanged(QListWidgetItem *current,
|
|||
|
||||
void OBSBasic::EditSceneName()
|
||||
{
|
||||
App()->DisableHotkeys();
|
||||
ui->scenesDock->removeAction(renameScene);
|
||||
QListWidgetItem *item = ui->scenes->currentItem();
|
||||
Qt::ItemFlags flags = item->flags();
|
||||
|
@ -5065,9 +5064,7 @@ void OBSBasic::on_actionAddScene_triggered()
|
|||
|
||||
void OBSBasic::on_actionRemoveScene_triggered()
|
||||
{
|
||||
App()->DisableHotkeys();
|
||||
RemoveSelectedScene();
|
||||
App()->UpdateHotkeyFocusSetting();
|
||||
}
|
||||
|
||||
void OBSBasic::ChangeSceneIndex(bool relative, int offset, int invalidIdx)
|
||||
|
@ -5757,8 +5754,6 @@ void OBSBasic::on_actionRemoveSource_triggered()
|
|||
if (!confirmed)
|
||||
return;
|
||||
|
||||
App()->DisableHotkeys();
|
||||
|
||||
/* ----------------------------------------------- */
|
||||
/* save undo data */
|
||||
|
||||
|
@ -5789,7 +5784,6 @@ void OBSBasic::on_actionRemoveSource_triggered()
|
|||
}
|
||||
|
||||
CreateSceneUndoRedoAction(action_name, undo_data, redo_data);
|
||||
App()->UpdateHotkeyFocusSetting();
|
||||
}
|
||||
|
||||
void OBSBasic::on_actionInteract_triggered()
|
||||
|
@ -6075,7 +6069,6 @@ static void RenameListItem(OBSBasic *parent, QListWidget *listWidget,
|
|||
void OBSBasic::SceneNameEdited(QWidget *editor,
|
||||
QAbstractItemDelegate::EndEditHint endHint)
|
||||
{
|
||||
App()->UpdateHotkeyFocusSetting();
|
||||
OBSScene scene = GetCurrentScene();
|
||||
QLineEdit *edit = qobject_cast<QLineEdit *>(editor);
|
||||
string text = QT_TO_UTF8(edit->text().trimmed());
|
||||
|
|
|
@ -214,8 +214,6 @@ OBSBasicProperties::OBSBasicProperties(QWidget *parent, OBSSource source_)
|
|||
} else {
|
||||
preview->hide();
|
||||
}
|
||||
|
||||
App()->DisableHotkeys();
|
||||
}
|
||||
|
||||
OBSBasicProperties::~OBSBasicProperties()
|
||||
|
@ -226,7 +224,6 @@ OBSBasicProperties::~OBSBasicProperties()
|
|||
obs_source_dec_showing(source);
|
||||
main->SaveProject();
|
||||
main->UpdateContextBar();
|
||||
App()->UpdateHotkeyFocusSetting();
|
||||
}
|
||||
|
||||
void OBSBasicProperties::AddPreviewButton()
|
||||
|
|
|
@ -297,13 +297,11 @@ void OBSBasicSourceSelect::on_buttonBox_accepted()
|
|||
obs_sceneitem_release(item);
|
||||
}
|
||||
|
||||
App()->UpdateHotkeyFocusSetting();
|
||||
done(DialogCode::Accepted);
|
||||
}
|
||||
|
||||
void OBSBasicSourceSelect::on_buttonBox_rejected()
|
||||
{
|
||||
App()->UpdateHotkeyFocusSetting();
|
||||
done(DialogCode::Rejected);
|
||||
}
|
||||
|
||||
|
@ -378,8 +376,6 @@ OBSBasicSourceSelect::OBSBasicSourceSelect(OBSBasic *parent, const char *id_,
|
|||
} else {
|
||||
obs_enum_sources(EnumSources, this);
|
||||
}
|
||||
|
||||
App()->DisableHotkeys();
|
||||
}
|
||||
|
||||
void OBSBasicSourceSelect::SourcePaste(const char *name, bool visible, bool dup)
|
||||
|
|
|
@ -67,7 +67,6 @@ bool NameDialog::AskForName(QWidget *parent, const QString &title,
|
|||
const QString &text, std::string &userTextInput,
|
||||
const QString &placeHolder, int maxSize)
|
||||
{
|
||||
App()->DisableHotkeys();
|
||||
if (maxSize <= 0 || maxSize > 32767)
|
||||
maxSize = 170;
|
||||
|
||||
|
@ -85,7 +84,6 @@ bool NameDialog::AskForName(QWidget *parent, const QString &title,
|
|||
}
|
||||
userTextInput = dialog.userText->text().toUtf8().constData();
|
||||
CleanWhitespace(userTextInput);
|
||||
App()->UpdateHotkeyFocusSetting();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -96,7 +94,6 @@ bool NameDialog::AskForNameWithOption(QWidget *parent, const QString &title,
|
|||
bool &optionChecked,
|
||||
const QString &placeHolder)
|
||||
{
|
||||
App()->DisableHotkeys();
|
||||
NameDialog dialog(parent);
|
||||
dialog.setWindowTitle(title);
|
||||
|
||||
|
@ -113,6 +110,5 @@ bool NameDialog::AskForNameWithOption(QWidget *parent, const QString &title,
|
|||
userTextInput = dialog.userText->text().toUtf8().constData();
|
||||
CleanWhitespace(userTextInput);
|
||||
optionChecked = dialog.checkbox->isChecked();
|
||||
App()->UpdateHotkeyFocusSetting();
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue