Merge pull request #854 from CookiePLMonster/hide-buttons
Properties: Hide buttons when not in the Properties tab
This commit is contained in:
commit
b81bb8079c
|
@ -377,6 +377,12 @@ void GamePropertiesDialog::connectUi()
|
||||||
connect(m_ui.exportCompatibilityInfo, &QPushButton::clicked, this,
|
connect(m_ui.exportCompatibilityInfo, &QPushButton::clicked, this,
|
||||||
&GamePropertiesDialog::onExportCompatibilityInfoClicked);
|
&GamePropertiesDialog::onExportCompatibilityInfoClicked);
|
||||||
connect(m_ui.close, &QPushButton::clicked, this, &QDialog::close);
|
connect(m_ui.close, &QPushButton::clicked, this, &QDialog::close);
|
||||||
|
connect(m_ui.tabWidget, &QTabWidget::currentChanged, [this](int index) {
|
||||||
|
const bool show_buttons = index == 0;
|
||||||
|
m_ui.computeHashes->setVisible(show_buttons);
|
||||||
|
m_ui.verifyDump->setVisible(show_buttons);
|
||||||
|
m_ui.exportCompatibilityInfo->setVisible(show_buttons);
|
||||||
|
});
|
||||||
|
|
||||||
connect(m_ui.userAspectRatio, QOverload<int>::of(&QComboBox::currentIndexChanged), [this](int index) {
|
connect(m_ui.userAspectRatio, QOverload<int>::of(&QComboBox::currentIndexChanged), [this](int index) {
|
||||||
if (index <= 0)
|
if (index <= 0)
|
||||||
|
|
Loading…
Reference in New Issue