From 7c884fec5548f004d5b3eef749e2d082616b29a8 Mon Sep 17 00:00:00 2001 From: AdenKoperczak Date: Mon, 9 Dec 2024 18:44:35 -0500 Subject: [PATCH] add inverted threshold to placefile text --- scwx-qt/source/scwx/qt/gl/draw/placefile_text.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scwx-qt/source/scwx/qt/gl/draw/placefile_text.cpp b/scwx-qt/source/scwx/qt/gl/draw/placefile_text.cpp index b8faa8f8..df4f650e 100644 --- a/scwx-qt/source/scwx/qt/gl/draw/placefile_text.cpp +++ b/scwx-qt/source/scwx/qt/gl/draw/placefile_text.cpp @@ -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_))) {