mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 05:20:06 +00:00 
			
		
		
		
	Cleanup of level 2 product selection, removing flicker from updates
This commit is contained in:
		
							parent
							
								
									159b3d8412
								
							
						
					
					
						commit
						52771b41f0
					
				
					 5 changed files with 129 additions and 111 deletions
				
			
		|  | @ -43,11 +43,10 @@ class Level2ProductViewImpl | |||
| public: | ||||
|    explicit Level2ProductViewImpl( | ||||
|       common::Level2Product                         product, | ||||
|       float                                         elevation, | ||||
|       std::shared_ptr<manager::RadarProductManager> radarProductManager) : | ||||
|        product_ {product}, | ||||
|        radarProductManager_ {radarProductManager}, | ||||
|        selectedElevation_ {elevation}, | ||||
|        selectedElevation_ {0.0f}, | ||||
|        selectedTime_ {}, | ||||
|        elevationScan_ {nullptr}, | ||||
|        momentDataBlock0_ {nullptr}, | ||||
|  | @ -117,10 +116,8 @@ public: | |||
| 
 | ||||
| Level2ProductView::Level2ProductView( | ||||
|    common::Level2Product                         product, | ||||
|    float                                         elevation, | ||||
|    std::shared_ptr<manager::RadarProductManager> radarProductManager) : | ||||
|     p(std::make_unique<Level2ProductViewImpl>( | ||||
|        product, elevation, radarProductManager)) | ||||
|     p(std::make_unique<Level2ProductViewImpl>(product, radarProductManager)) | ||||
| { | ||||
| } | ||||
| Level2ProductView::~Level2ProductView() = default; | ||||
|  | @ -642,11 +639,9 @@ void Level2ProductView::ComputeSweep() | |||
| 
 | ||||
| std::shared_ptr<Level2ProductView> Level2ProductView::Create( | ||||
|    common::Level2Product                         product, | ||||
|    float                                         elevation, | ||||
|    std::shared_ptr<manager::RadarProductManager> radarProductManager) | ||||
| { | ||||
|    return std::make_shared<Level2ProductView>( | ||||
|       product, elevation, radarProductManager); | ||||
|    return std::make_shared<Level2ProductView>(product, radarProductManager); | ||||
| } | ||||
| 
 | ||||
| } // namespace view
 | ||||
|  |  | |||
|  | @ -25,7 +25,6 @@ class Level2ProductView : public RadarProductView | |||
| public: | ||||
|    explicit Level2ProductView( | ||||
|       common::Level2Product                         product, | ||||
|       float                                         elevation, | ||||
|       std::shared_ptr<manager::RadarProductManager> radarProductManager); | ||||
|    ~Level2ProductView(); | ||||
| 
 | ||||
|  | @ -51,7 +50,6 @@ public: | |||
| 
 | ||||
|    static std::shared_ptr<Level2ProductView> | ||||
|    Create(common::Level2Product                         product, | ||||
|           float                                         elevation, | ||||
|           std::shared_ptr<manager::RadarProductManager> radarProductManager); | ||||
| 
 | ||||
| protected: | ||||
|  |  | |||
|  | @ -35,7 +35,6 @@ std::shared_ptr<RadarProductView> RadarProductViewFactory::Create( | |||
|    common::RadarProductGroup                     productGroup, | ||||
|    const std::string&                            productName, | ||||
|    int16_t                                       productCode, | ||||
|    float                                         elevation, | ||||
|    std::shared_ptr<manager::RadarProductManager> radarProductManager) | ||||
| { | ||||
|    std::shared_ptr<RadarProductView> view = nullptr; | ||||
|  | @ -50,7 +49,7 @@ std::shared_ptr<RadarProductView> RadarProductViewFactory::Create( | |||
|       } | ||||
|       else | ||||
|       { | ||||
|          view = Create(product, elevation, radarProductManager); | ||||
|          view = Create(product, radarProductManager); | ||||
|       } | ||||
|    } | ||||
|    else if (productGroup == common::RadarProductGroup::Level3) | ||||
|  | @ -75,10 +74,9 @@ std::shared_ptr<RadarProductView> RadarProductViewFactory::Create( | |||
| 
 | ||||
| std::shared_ptr<RadarProductView> RadarProductViewFactory::Create( | ||||
|    common::Level2Product                         product, | ||||
|    float                                         elevation, | ||||
|    std::shared_ptr<manager::RadarProductManager> radarProductManager) | ||||
| { | ||||
|    return Level2ProductView::Create(product, elevation, radarProductManager); | ||||
|    return Level2ProductView::Create(product, radarProductManager); | ||||
| } | ||||
| 
 | ||||
| } // namespace view
 | ||||
|  |  | |||
|  | @ -31,11 +31,9 @@ public: | |||
|    Create(common::RadarProductGroup                     productGroup, | ||||
|           const std::string&                            productName, | ||||
|           int16_t                                       productCode, | ||||
|           float                                         elevation, | ||||
|           std::shared_ptr<manager::RadarProductManager> radarProductManager); | ||||
|    static std::shared_ptr<RadarProductView> | ||||
|    Create(common::Level2Product                         product, | ||||
|           float                                         elevation, | ||||
|           std::shared_ptr<manager::RadarProductManager> radarProductManager); | ||||
| }; | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat