mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-28 13:57:22 +00:00
GUI: language dialog: auto-focus first control on mode switch
This commit is contained in:
parent
0398b02eea
commit
b41d623d6a
8
NEWS.md
8
NEWS.md
@ -1,3 +1,11 @@
|
||||
# Version ?
|
||||
|
||||
## New features and enhancements
|
||||
|
||||
* MKVToolNix GUI: language dialog: when the user switches between the two edit
|
||||
modes, the mode's corresponding first control is automatically focussed.
|
||||
|
||||
|
||||
# Version 63.0.0 "Everything" 2021-11-14
|
||||
|
||||
## New features and enhancements
|
||||
|
@ -89,14 +89,11 @@ LanguageDialog::LanguageDialog(QWidget *parent)
|
||||
|
||||
p.ui->setupUi(this);
|
||||
|
||||
if (Settings::get().m_bcp47LanguageEditingMode == Settings::BCP47LanguageEditingMode::FreeForm) {
|
||||
if (Settings::get().m_bcp47LanguageEditingMode == Settings::BCP47LanguageEditingMode::FreeForm)
|
||||
p.ui->rbFreeForm->setChecked(true);
|
||||
p.ui->leFreeForm->setFocus();
|
||||
|
||||
} else {
|
||||
else
|
||||
p.ui->rbComponentSelection->setChecked(true);
|
||||
p.ui->cbLanguage->setFocus();
|
||||
}
|
||||
|
||||
createInitialComponentWidgetList();
|
||||
createGridLayoutFromComponentWidgetList();
|
||||
@ -341,6 +338,8 @@ LanguageDialog::setupFreeFormAndComponentControls() {
|
||||
|
||||
connect(p.ui->leFreeForm, &QLineEdit::textChanged, this, &LanguageDialog::updateFromFreeForm);
|
||||
|
||||
p.ui->leFreeForm->setFocus();
|
||||
|
||||
} else {
|
||||
p.ui->leFreeForm->setEnabled(false);
|
||||
Util::enableChildren(p.ui->sawComponents, true);
|
||||
@ -349,6 +348,8 @@ LanguageDialog::setupFreeFormAndComponentControls() {
|
||||
|
||||
for (auto widget : componentWidgets)
|
||||
connectComponentWidgetChange(widget);
|
||||
|
||||
p.ui->cbLanguage->setFocus();
|
||||
}
|
||||
|
||||
maybeEnableAddExtendedSubtagButton();
|
||||
|
Loading…
Reference in New Issue
Block a user