mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 06:50:05 +00:00 
			
		
		
		
	When viewing live level 2 data, ensure the latest scan is selected
This commit is contained in:
		
							parent
							
								
									c94e483c6e
								
							
						
					
					
						commit
						69d5a36f55
					
				
					 2 changed files with 13 additions and 2 deletions
				
			
		|  | @ -1800,9 +1800,18 @@ void MapWidgetImpl::RadarProductManagerConnect() | ||||||
|                             context_->radar_product_group() == group && |                             context_->radar_product_group() == group && | ||||||
|                             (group == common::RadarProductGroup::Level2 || |                             (group == common::RadarProductGroup::Level2 || | ||||||
|                              context_->radar_product() == product)) |                              context_->radar_product() == product)) | ||||||
|  |                         { | ||||||
|  |                            if (group == common::RadarProductGroup::Level2) | ||||||
|  |                            { | ||||||
|  |                               // Level 2 products may have multiple time points,
 | ||||||
|  |                               // ensure the latest is selected
 | ||||||
|  |                               widget_->SelectRadarProduct(group, product); | ||||||
|  |                            } | ||||||
|  |                            else | ||||||
|                            { |                            { | ||||||
|                               widget_->SelectRadarProduct(record); |                               widget_->SelectRadarProduct(record); | ||||||
|                            } |                            } | ||||||
|  |                         } | ||||||
|                      }); |                      }); | ||||||
|                } |                } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -191,7 +191,9 @@ Ar2vFile::GetElevationScan(rda::DataBlockType                    dataBlockType, | ||||||
|          auto scanTime = std::chrono::floor<std::chrono::seconds>(scan.first); |          auto scanTime = std::chrono::floor<std::chrono::seconds>(scan.first); | ||||||
| 
 | 
 | ||||||
|          if (elevationScan == nullptr || |          if (elevationScan == nullptr || | ||||||
|              (scanTime <= time && scanTime > foundTime)) |              ((scanTime <= time || | ||||||
|  |                time == std::chrono::system_clock::time_point {}) && | ||||||
|  |               scanTime > foundTime)) | ||||||
|          { |          { | ||||||
|             elevationScan = scan.second; |             elevationScan = scan.second; | ||||||
|             foundTime     = scanTime; |             foundTime     = scanTime; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat