From 0b33933a16c636b83f1fa25159c9d0cde4ca98a2 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 10 Jul 2020 11:14:30 -0400 Subject: [PATCH] CTweakEditor: Make use of QSignalBlocker --- src/Editor/CTweakEditor.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Editor/CTweakEditor.cpp b/src/Editor/CTweakEditor.cpp index 6462666f..e67db4d8 100644 --- a/src/Editor/CTweakEditor.cpp +++ b/src/Editor/CTweakEditor.cpp @@ -103,7 +103,7 @@ void CTweakEditor::OnProjectChanged(CGameProject* pNewProject) mpUI->PropertyView->ClearProperties(); close(); - mpUI->TweakTabs->blockSignals(true); + [[maybe_unused]] const QSignalBlocker tweakBlocker{mpUI->TweakTabs}; while (mpUI->TweakTabs->count() > 0) { @@ -141,8 +141,6 @@ void CTweakEditor::OnProjectChanged(CGameProject* pNewProject) SetActiveTweakIndex(0); } - mpUI->TweakTabs->blockSignals(false); - // Hide "save and repack" button for MP2+ as it doesn't do anything different from the regular Save button mpUI->ActionSaveAndRepack->setVisible(!pNewProject || pNewProject->Game() <= EGame::Prime); }