mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 15:10:05 +00:00 
			
		
		
		
	Re-add inactive alert palette display
This commit is contained in:
		
							parent
							
								
									dafb71e75c
								
							
						
					
					
						commit
						584f5943b6
					
				
					 1 changed files with 13 additions and 3 deletions
				
			
		|  | @ -160,7 +160,8 @@ public: | ||||||
|                             const QPointF& mouseGlobalPos); |                             const QPointF& mouseGlobalPos); | ||||||
|    void ScheduleRefresh(); |    void ScheduleRefresh(); | ||||||
| 
 | 
 | ||||||
|    LineData& GetLineData(std::shared_ptr<const awips::Segment>& segment); |    LineData& GetLineData(std::shared_ptr<const awips::Segment>& segment, | ||||||
|  |                          bool                                   alertActive); | ||||||
|    void      UpdateLineData(); |    void      UpdateLineData(); | ||||||
| 
 | 
 | ||||||
|    void AddLine(std::shared_ptr<gl::draw::GeoLines>&        geoLines, |    void AddLine(std::shared_ptr<gl::draw::GeoLines>&        geoLines, | ||||||
|  | @ -211,6 +212,7 @@ public: | ||||||
|             threatCategoryLineData_; |             threatCategoryLineData_; | ||||||
|    LineData observedLineData_ {}; |    LineData observedLineData_ {}; | ||||||
|    LineData tornadoPossibleLineData_ {}; |    LineData tornadoPossibleLineData_ {}; | ||||||
|  |    LineData inactiveLineData_ {}; | ||||||
| 
 | 
 | ||||||
|    std::chrono::system_clock::time_point selectedTime_ {}; |    std::chrono::system_clock::time_point selectedTime_ {}; | ||||||
| 
 | 
 | ||||||
|  | @ -456,7 +458,7 @@ void AlertLayer::Impl::AddAlert( | ||||||
|    auto& startTime   = segmentRecord->segmentBegin_; |    auto& startTime   = segmentRecord->segmentBegin_; | ||||||
|    auto& endTime     = segmentRecord->segmentEnd_; |    auto& endTime     = segmentRecord->segmentEnd_; | ||||||
| 
 | 
 | ||||||
|    auto& lineData = GetLineData(segment); |    auto& lineData = GetLineData(segment, alertActive); | ||||||
|    auto& geoLines = geoLines_.at(alertActive); |    auto& geoLines = geoLines_.at(alertActive); | ||||||
| 
 | 
 | ||||||
|    const auto& coordinates = segment->codedLocation_->coordinates(); |    const auto& coordinates = segment->codedLocation_->coordinates(); | ||||||
|  | @ -706,11 +708,19 @@ void AlertLayer::Impl::UpdateLineData() | ||||||
|       tornadoPossibleLineData_ = |       tornadoPossibleLineData_ = | ||||||
|          CreateLineData(alertPalette.tornado_possible()); |          CreateLineData(alertPalette.tornado_possible()); | ||||||
|    } |    } | ||||||
|  | 
 | ||||||
|  |    inactiveLineData_ = CreateLineData(alertPalette.inactive()); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| AlertLayer::Impl::LineData& | AlertLayer::Impl::LineData& | ||||||
| AlertLayer::Impl::GetLineData(std::shared_ptr<const awips::Segment>& segment) | AlertLayer::Impl::GetLineData(std::shared_ptr<const awips::Segment>& segment, | ||||||
|  |                               bool alertActive) | ||||||
| { | { | ||||||
|  |    if (!alertActive) | ||||||
|  |    { | ||||||
|  |       return inactiveLineData_; | ||||||
|  |    } | ||||||
|  | 
 | ||||||
|    for (auto& threatCategory : ibw_.threatCategories_) |    for (auto& threatCategory : ibw_.threatCategories_) | ||||||
|    { |    { | ||||||
|       if (segment->threatCategory_ == threatCategory) |       if (segment->threatCategory_ == threatCategory) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat