mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 13:20:06 +00:00 
			
		
		
		
	Ensure AlertLayerHandler is initialized prior to loading warnings
This commit is contained in:
		
							parent
							
								
									aec52f940d
								
							
						
					
					
						commit
						264cfb9326
					
				
					 3 changed files with 17 additions and 0 deletions
				
			
		|  | @ -206,6 +206,18 @@ AlertLayer::AlertLayer(std::shared_ptr<MapContext> context, | ||||||
| 
 | 
 | ||||||
| AlertLayer::~AlertLayer() = default; | AlertLayer::~AlertLayer() = default; | ||||||
| 
 | 
 | ||||||
|  | void AlertLayer::InitializeHandler() | ||||||
|  | { | ||||||
|  |    static bool ftt = true; | ||||||
|  | 
 | ||||||
|  |    if (ftt) | ||||||
|  |    { | ||||||
|  |       logger_->debug("Initializing handler"); | ||||||
|  |       AlertLayerHandler::Instance(); | ||||||
|  |       ftt = false; | ||||||
|  |    } | ||||||
|  | } | ||||||
|  | 
 | ||||||
| void AlertLayer::Initialize() | void AlertLayer::Initialize() | ||||||
| { | { | ||||||
|    logger_->debug("Initialize: {}", awips::GetPhenomenonText(p->phenomenon_)); |    logger_->debug("Initialize: {}", awips::GetPhenomenonText(p->phenomenon_)); | ||||||
|  |  | ||||||
|  | @ -29,6 +29,8 @@ public: | ||||||
|    void Render(const QMapLibre::CustomLayerRenderParameters&) override final; |    void Render(const QMapLibre::CustomLayerRenderParameters&) override final; | ||||||
|    void Deinitialize() override final; |    void Deinitialize() override final; | ||||||
| 
 | 
 | ||||||
|  |    static void InitializeHandler(); | ||||||
|  | 
 | ||||||
| signals: | signals: | ||||||
|    void AlertSelected(const types::TextEventKey& key); |    void AlertSelected(const types::TextEventKey& key); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -99,6 +99,9 @@ public: | ||||||
|       overlayProductView->SetAutoRefresh(autoRefreshEnabled_); |       overlayProductView->SetAutoRefresh(autoRefreshEnabled_); | ||||||
|       overlayProductView->SetAutoUpdate(autoUpdateEnabled_); |       overlayProductView->SetAutoUpdate(autoUpdateEnabled_); | ||||||
| 
 | 
 | ||||||
|  |       // Initialize AlertLayerHandler
 | ||||||
|  |       map::AlertLayer::InitializeHandler(); | ||||||
|  | 
 | ||||||
|       auto& generalSettings = settings::GeneralSettings::Instance(); |       auto& generalSettings = settings::GeneralSettings::Instance(); | ||||||
| 
 | 
 | ||||||
|       // Initialize context
 |       // Initialize context
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat