From ddf11884a8537d38aa1d0b5bff1732aba74e36f2 Mon Sep 17 00:00:00 2001 From: Dan Paulat Date: Sun, 20 Aug 2023 22:38:16 -0500 Subject: [PATCH] Buffer new icons when placefile changes --- scwx-qt/source/scwx/qt/gl/draw/placefile_icons.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/scwx-qt/source/scwx/qt/gl/draw/placefile_icons.cpp b/scwx-qt/source/scwx/qt/gl/draw/placefile_icons.cpp index 11d844c7..4c1ec1a4 100644 --- a/scwx-qt/source/scwx/qt/gl/draw/placefile_icons.cpp +++ b/scwx-qt/source/scwx/qt/gl/draw/placefile_icons.cpp @@ -433,7 +433,7 @@ void PlacefileIcons::Impl::UpdateBuffers() void PlacefileIcons::Impl::Update(bool textureAtlasChanged) { // If the texture atlas has changed - if (textureAtlasChanged) + if (dirty_ || textureAtlasChanged) { // Update texture coordinates for (auto& iconFile : currentIconFiles_) @@ -443,10 +443,7 @@ void PlacefileIcons::Impl::Update(bool textureAtlasChanged) // Update OpenGL buffer data UpdateBuffers(); - } - if (dirty_) - { gl::OpenGLFunctions& gl = context_->gl(); // Buffer vertex data