From 2e973bf6549f8bc0ecea148f7632b6946a9e5ff8 Mon Sep 17 00:00:00 2001 From: AdenKoperczak Date: Fri, 10 Jan 2025 09:57:38 -0500 Subject: [PATCH] Modified font atlas not build logging to only log once --- scwx-qt/source/scwx/qt/map/map_widget.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scwx-qt/source/scwx/qt/map/map_widget.cpp b/scwx-qt/source/scwx/qt/map/map_widget.cpp index d569f27e..ab7b0cf6 100644 --- a/scwx-qt/source/scwx/qt/map/map_widget.cpp +++ b/scwx-qt/source/scwx/qt/map/map_widget.cpp @@ -1619,9 +1619,12 @@ void MapWidgetImpl::ImGuiCheckFonts() ImGui_ImplOpenGL3_CreateFontsTexture(); } - if (!model::ImGuiContextModel::Instance().font_atlas()->IsBuilt()) + static bool haveLogged = false; + if (!model::ImGuiContextModel::Instance().font_atlas()->IsBuilt() && + !haveLogged) { logger_->error("ImGui font atlas could not be built."); + haveLogged = true; } imGuiFontsBuildCount_ = currentImGuiFontsBuildCount;