From 464657e20efea7f7b9aed0457678db62cf79a96a Mon Sep 17 00:00:00 2001 From: David Salvisberg Date: Sat, 18 Jul 2015 18:07:40 +0200 Subject: [PATCH] Fixed uneven Push Pop calls in their respective Begin End scopes. --- src/settingsmenu.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/settingsmenu.cpp b/src/settingsmenu.cpp index 4b78e2c..4f4b2e2 100644 --- a/src/settingsmenu.cpp +++ b/src/settingsmenu.cpp @@ -355,6 +355,8 @@ struct SettingsMenuPrivate break; } ImGui::End(); + ImGui::PopStyleColor(4); + ImGui::PopStyleVar(); } ImGui::Render(); SDL_GL_SwapWindow(window); @@ -409,9 +411,8 @@ struct SettingsMenuPrivate } ImGui::EndChild(); + ImGui::PopStyleColor(2); ImGui::PopStyleVar(); - ImGui::PopStyleColor(); - ImGui::PopStyleColor(); ImGui::Spacing(); ImGui::Separator(); @@ -475,9 +476,7 @@ struct SettingsMenuPrivate ImGui::SetWindowPos(pos); result = ImGui::Button(str_id, innerSize); ImGui::EndChildFrame(); - ImGui::PopStyleColor(); - ImGui::PopStyleColor(); - ImGui::PopStyleColor(); + ImGui::PopStyleColor(3); return result; } @@ -487,9 +486,7 @@ struct SettingsMenuPrivate ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImGui::GetStyle().Colors[ImGuiCol_WindowBg]); ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImGui::GetStyle().Colors[ImGuiCol_WindowBg]); ImGui::Button(str_id, size); - ImGui::PopStyleColor(); - ImGui::PopStyleColor(); - ImGui::PopStyleColor(); + ImGui::PopStyleColor(3); } void displayGraphicsTab()