From 5fcdb6f8f9a5a0cb5fbc3e0e201119b832eef03c Mon Sep 17 00:00:00 2001 From: JosJuice Date: Mon, 6 Apr 2026 17:59:45 +0200 Subject: [PATCH] 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. --- Source/Core/DolphinQt/Config/GameConfigEdit.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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);