mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 01:40:04 +00:00 
			
		
		
		
	Store last load status
This commit is contained in:
		
							parent
							
								
									341096af1d
								
							
						
					
					
						commit
						931dd2d0a7
					
				
					 1 changed files with 15 additions and 2 deletions
				
			
		|  | @ -63,6 +63,9 @@ public: | |||
| 
 | ||||
|    bool colorTableNeedsUpdate_ {false}; | ||||
|    bool sweepNeedsUpdate_ {false}; | ||||
| 
 | ||||
|    types::RadarProductLoadStatus lastLoadStatus_ { | ||||
|       types::RadarProductLoadStatus::ProductNotAvailable}; | ||||
| }; | ||||
| 
 | ||||
| RadarProductLayer::RadarProductLayer(std::shared_ptr<gl::GlContext> 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>&            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(); | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat