diff options
| author | JosJuice <josjuice@gmail.com> | 2026-04-06 17:59:45 +0200 |
|---|---|---|
| committer | JosJuice <josjuice@gmail.com> | 2026-04-06 18:02:24 +0200 |
| commit | 5fcdb6f8f9a5a0cb5fbc3e0e201119b832eef03c (patch) | |
| tree | 4547af5a4515c27caa91132ca3220e3487e520bb /Source/Core | |
| parent | 7e98245ca47ff2ea0203930049cc725b4c433f72 (diff) | |
DolphinQt: Hide buttons for read-only game config
The Open in External Editor button makes editing a game INI file easy,
and the Refresh button is only useful if you edit the game INI. You're
not supposed to edit read-only game INIs, so let's not show these two
buttons for read-only game INIs.
I implemented this by hiding the buttons instead of not creating them in
the first place so we don't have to branch on whether the buttons exist
in GameConfigEdit::ConnectWidgets.
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/DolphinQt/Config/GameConfigEdit.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/Core/DolphinQt/Config/GameConfigEdit.cpp b/Source/Core/DolphinQt/Config/GameConfigEdit.cpp index e43c222293..9d9f79848e 100644 --- a/Source/Core/DolphinQt/Config/GameConfigEdit.cpp +++ b/Source/Core/DolphinQt/Config/GameConfigEdit.cpp @@ -83,6 +83,12 @@ void GameConfigEdit::CreateWidgets() m_refresh_button = new QPushButton(tr("Refresh")); m_external_editor_button = new QPushButton(tr("Open in External Editor")); + if (m_read_only) + { + m_refresh_button->hide(); + m_external_editor_button->hide(); + } + auto* button_layout = new QHBoxLayout; button_layout->addWidget(m_refresh_button); button_layout->addWidget(m_external_editor_button); |
