From 931dd2d0a78d749a2f3061c506ff2cf637402bad Mon Sep 17 00:00:00 2001 From: Dan Paulat Date: Sat, 30 Aug 2025 20:30:32 -0500 Subject: [PATCH] Store last load status --- .../source/scwx/qt/map/radar_product_layer.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/scwx-qt/source/scwx/qt/map/radar_product_layer.cpp b/scwx-qt/source/scwx/qt/map/radar_product_layer.cpp index 3ed68897..6e315a4a 100644 --- a/scwx-qt/source/scwx/qt/map/radar_product_layer.cpp +++ b/scwx-qt/source/scwx/qt/map/radar_product_layer.cpp @@ -63,6 +63,9 @@ public: bool colorTableNeedsUpdate_ {false}; bool sweepNeedsUpdate_ {false}; + + types::RadarProductLoadStatus lastLoadStatus_ { + types::RadarProductLoadStatus::ProductNotAvailable}; }; RadarProductLayer::RadarProductLayer(std::shared_ptr glContext) : @@ -158,7 +161,12 @@ void RadarProductLayer::Initialize( } if (reason == types::NoUpdateReason::NoChange) { - Q_EMIT NeedsRendering(); + if (p->lastLoadStatus_ == + types::RadarProductLoadStatus::ProductNotAvailable) + { + // Ensure the radar product is shown by re-rendering + Q_EMIT NeedsRendering(); + } } }); } @@ -273,7 +281,6 @@ void RadarProductLayer::Render( const std::shared_ptr& mapContext, const QMapLibre::CustomLayerRenderParameters& params) { - p->shaderProgram_->Use(); // Set OpenGL blend mode for transparency @@ -343,6 +350,12 @@ void RadarProductLayer::Render( glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); } + if (radarProductView != nullptr) + { + // Save last load status + p->lastLoadStatus_ = radarProductView->load_status(); + } + SCWX_GL_CHECK_ERROR(); }