mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 01:30:05 +00:00 
			
		
		
		
	Enable/disable auto update of radar data based on timeline selection
This commit is contained in:
		
							parent
							
								
									80f04be510
								
							
						
					
					
						commit
						4963add9cc
					
				
					 8 changed files with 129 additions and 39 deletions
				
			
		|  | @ -62,6 +62,7 @@ public: | |||
|        overlayLayer_ {nullptr}, | ||||
|        colorTableLayer_ {nullptr}, | ||||
|        autoRefreshEnabled_ {true}, | ||||
|        autoUpdateEnabled_ {true}, | ||||
|        selectedLevel2Product_ {common::Level2Product::Unknown}, | ||||
|        lastPos_(), | ||||
|        currentStyleIndex_ {0}, | ||||
|  | @ -146,6 +147,7 @@ public: | |||
|    std::shared_ptr<ColorTableLayer>   colorTableLayer_; | ||||
| 
 | ||||
|    bool autoRefreshEnabled_; | ||||
|    bool autoUpdateEnabled_; | ||||
| 
 | ||||
|    common::Level2Product selectedLevel2Product_; | ||||
| 
 | ||||
|  | @ -520,6 +522,11 @@ void MapWidget::SetAutoRefresh(bool enabled) | |||
|    } | ||||
| } | ||||
| 
 | ||||
| void MapWidget::SetAutoUpdate(bool enabled) | ||||
| { | ||||
|    p->autoUpdateEnabled_ = enabled; | ||||
| } | ||||
| 
 | ||||
| void MapWidget::SetMapLocation(double latitude, | ||||
|                                double longitude, | ||||
|                                bool   updateRadarSite) | ||||
|  | @ -869,7 +876,7 @@ void MapWidgetImpl::RadarProductManagerConnect() | |||
|                 const std::string&                    product, | ||||
|                 std::chrono::system_clock::time_point latestTime) | ||||
|          { | ||||
|             if (autoRefreshEnabled_ && | ||||
|             if (autoUpdateEnabled_ && | ||||
|                 context_->radar_product_group() == group && | ||||
|                 (group == common::RadarProductGroup::Level2 || | ||||
|                  context_->radar_product() == product)) | ||||
|  |  | |||
|  | @ -89,6 +89,7 @@ public: | |||
| 
 | ||||
|    void SetActive(bool isActive); | ||||
|    void SetAutoRefresh(bool enabled); | ||||
|    void SetAutoUpdate(bool enabled); | ||||
| 
 | ||||
|    /**
 | ||||
|     * @brief Sets the current map location. | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat