add inverted threshold to placefile text

This commit is contained in:
AdenKoperczak 2024-12-09 18:44:35 -05:00
parent 3562edcb7a
commit 7c884fec55

View file

@ -136,7 +136,10 @@ void PlacefileText::Impl::RenderTextDrawItem(
std::chrono::system_clock::now() :
selectedTime_;
if ((!thresholded_ || mapDistance_ <= di->threshold_) &&
const bool thresholdMet = mapDistance_ <= di->threshold_ ||
((double)di->threshold_ < 0.0 && mapDistance_ >= -(di->threshold_));
if ((!thresholded_ || thresholdMet) &&
(di->startTime_ == std::chrono::system_clock::time_point {} ||
(di->startTime_ <= selectedTime && selectedTime < di->endTime_)))
{