mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 02:10:05 +00:00 
			
		
		
		
	Load correct level 2 product if one was previously selected
This commit is contained in:
		
							parent
							
								
									0be0e420d1
								
							
						
					
					
						commit
						5a0224631d
					
				
					 1 changed files with 12 additions and 1 deletions
				
			
		|  | @ -61,6 +61,7 @@ public: | |||
|        radarProductLayer_ {nullptr}, | ||||
|        overlayLayer_ {nullptr}, | ||||
|        colorTableLayer_ {nullptr}, | ||||
|        selectedLevel2Product_ {common::Level2Product::Unknown}, | ||||
|        selectedTime_ {}, | ||||
|        lastPos_(), | ||||
|        currentStyleIndex_ {0}, | ||||
|  | @ -97,6 +98,7 @@ public: | |||
|    std::shared_ptr<OverlayLayer>      overlayLayer_; | ||||
|    std::shared_ptr<ColorTableLayer>   colorTableLayer_; | ||||
| 
 | ||||
|    common::Level2Product                 selectedLevel2Product_; | ||||
|    std::chrono::system_clock::time_point selectedTime_; | ||||
| 
 | ||||
|    QPointF lastPos_; | ||||
|  | @ -167,7 +169,14 @@ MapWidgetImpl::GetLevel2ProductOrDefault(const std::string& productName) const | |||
| 
 | ||||
|    if (level2Product == common::Level2Product::Unknown) | ||||
|    { | ||||
|       level2Product = common::Level2Product::Reflectivity; | ||||
|       if (selectedLevel2Product_ != common::Level2Product::Unknown) | ||||
|       { | ||||
|          level2Product = selectedLevel2Product_; | ||||
|       } | ||||
|       else | ||||
|       { | ||||
|          level2Product = common::Level2Product::Reflectivity; | ||||
|       } | ||||
|    } | ||||
| 
 | ||||
|    return level2Product; | ||||
|  | @ -236,6 +245,8 @@ void MapWidget::SelectRadarProduct(common::Level2Product product) | |||
|       product, currentElevation, p->radarProductManager_); | ||||
|    radarProductView->SelectTime(p->selectedTime_); | ||||
| 
 | ||||
|    p->selectedLevel2Product_ = product; | ||||
| 
 | ||||
|    connect( | ||||
|       radarProductView.get(), | ||||
|       &view::RadarProductView::ColorTableUpdated, | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat