From a6b3a2cd4f780c076f2352790574204b89f5c531 Mon Sep 17 00:00:00 2001 From: Jordan Woyak <jordan.woyak@gmail.com> Date: Fri, 8 Nov 2019 17:45:43 -0600 Subject: [PATCH] DolphinQt: Hide unused buttons in the advanced mapping dialog. --- .../Core/DolphinQt/Config/Mapping/IOWindow.cpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/Source/Core/DolphinQt/Config/Mapping/IOWindow.cpp b/Source/Core/DolphinQt/Config/Mapping/IOWindow.cpp index 4cfe396f69..6a707587f6 100644 --- a/Source/Core/DolphinQt/Config/Mapping/IOWindow.cpp +++ b/Source/Core/DolphinQt/Config/Mapping/IOWindow.cpp @@ -323,12 +323,24 @@ void IOWindow::CreateMainLayout() hbox->addLayout(button_vbox, 1); 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) { - 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->addWidget(m_expression_text, 1);