Merge pull request #8459 from jordan-woyak/io-window-button-fix

DolphinQt: Hide unused buttons in the advanced mapping dialog.
This commit is contained in:
Léo Lam 2019-11-09 19:18:26 +01:00 committed by GitHub
commit 877519a0a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 3 deletions

View File

@ -323,12 +323,24 @@ void IOWindow::CreateMainLayout()
hbox->addLayout(button_vbox, 1); hbox->addLayout(button_vbox, 1);
button_vbox->addWidget(m_select_button); button_vbox->addWidget(m_select_button);
button_vbox->addWidget(m_type == Type::Input ? m_detect_button : m_test_button);
button_vbox->addWidget(m_operators_combo);
if (m_type == Type::Input) if (m_type == Type::Input)
{ {
button_vbox->addWidget(m_functions_combo); m_test_button->hide();
button_vbox->addWidget(m_detect_button);
} }
else
{
m_detect_button->hide();
button_vbox->addWidget(m_test_button);
}
button_vbox->addWidget(m_operators_combo);
if (m_type == Type::Input)
button_vbox->addWidget(m_functions_combo);
else
m_functions_combo->hide();
m_main_layout->addLayout(hbox, 2); m_main_layout->addLayout(hbox, 2);
m_main_layout->addWidget(m_expression_text, 1); m_main_layout->addWidget(m_expression_text, 1);