From 25acfb9067b16c55c289fa1980374f75d9d898d7 Mon Sep 17 00:00:00 2001 From: Petr Ohlidal Date: Sat, 3 Aug 2024 17:01:57 +0200 Subject: [PATCH] Fixed repeated window size bump in GameSettings/RenderSystem --- source/main/gui/panels/GUI_GameSettings.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/main/gui/panels/GUI_GameSettings.cpp b/source/main/gui/panels/GUI_GameSettings.cpp index 1ca9a50d39..56a83ae475 100644 --- a/source/main/gui/panels/GUI_GameSettings.cpp +++ b/source/main/gui/panels/GUI_GameSettings.cpp @@ -181,8 +181,11 @@ void GameSettings::DrawRenderSystemSettings() ogre_root->saveConfig(); // Show the "Must restart game..." box, make the window bigger to accomodate it - m_render_must_restart = true; - m_bump_height = ImGui::GetTextLineHeightWithSpacing() + ImGui::GetStyle().FramePadding.y * 2; + if (!m_render_must_restart) + { + m_render_must_restart = true; + m_bump_height = ImGui::GetTextLineHeightWithSpacing() + ImGui::GetStyle().FramePadding.y * 2; + } } } }