From ecf7579d8e9d6194e0840c88eb65e5519bcefdb1 Mon Sep 17 00:00:00 2001 From: AdenKoperczak Date: Thu, 19 Dec 2024 09:31:55 -0500 Subject: [PATCH 1/2] Add inverted threshold to mouse picking for placefiles. --- scwx-qt/source/scwx/qt/gl/draw/placefile_icons.cpp | 6 ++++-- scwx-qt/source/scwx/qt/gl/draw/placefile_lines.cpp | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/scwx-qt/source/scwx/qt/gl/draw/placefile_icons.cpp b/scwx-qt/source/scwx/qt/gl/draw/placefile_icons.cpp index abc852f8..b321e149 100644 --- a/scwx-qt/source/scwx/qt/gl/draw/placefile_icons.cpp +++ b/scwx-qt/source/scwx/qt/gl/draw/placefile_icons.cpp @@ -737,8 +737,10 @@ bool PlacefileIcons::RunMousePicking( units::length::nautical_miles {icon.di_->threshold_} .value())) < 999 && - // Map distance is beyond the threshold - icon.di_->threshold_ < mapDistance) || + // Map distance is beyond/within the threshold + icon.di_->threshold_ < mapDistance && + (icon.di_->threshold_.value() >= 0.0 || + -(icon.di_->threshold_) > mapDistance)) || ( // Line has a start time diff --git a/scwx-qt/source/scwx/qt/gl/draw/placefile_lines.cpp b/scwx-qt/source/scwx/qt/gl/draw/placefile_lines.cpp index 58b86c37..6ec2750a 100644 --- a/scwx-qt/source/scwx/qt/gl/draw/placefile_lines.cpp +++ b/scwx-qt/source/scwx/qt/gl/draw/placefile_lines.cpp @@ -544,8 +544,10 @@ bool PlacefileLines::RunMousePicking( units::length::nautical_miles {line.di_->threshold_} .value())) < 999 && - // Map distance is beyond the threshold - line.di_->threshold_ < mapDistance) || + // Map distance is beyond/within the threshold + line.di_->threshold_ < mapDistance && + (line.di_->threshold_.value() >= 0.0 || + -(line.di_->threshold_) > mapDistance)) || ( // Line has a start time From 27f8c1f56c10aec5bde1be1fd2f7982c2a527f67 Mon Sep 17 00:00:00 2001 From: AdenKoperczak Date: Thu, 19 Dec 2024 09:38:14 -0500 Subject: [PATCH 2/2] Add inverted threshold to mouse picking for geo icons/lines --- scwx-qt/source/scwx/qt/gl/draw/geo_icons.cpp | 6 ++++-- scwx-qt/source/scwx/qt/gl/draw/geo_lines.cpp | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/scwx-qt/source/scwx/qt/gl/draw/geo_icons.cpp b/scwx-qt/source/scwx/qt/gl/draw/geo_icons.cpp index 622718e3..f991893f 100644 --- a/scwx-qt/source/scwx/qt/gl/draw/geo_icons.cpp +++ b/scwx-qt/source/scwx/qt/gl/draw/geo_icons.cpp @@ -947,8 +947,10 @@ bool GeoIcons::RunMousePicking( units::length::nautical_miles {icon.di_->threshold_} .value())) < 999 && - // Map distance is beyond the threshold - icon.di_->threshold_ < mapDistance) || + // Map distance is beyond/within the threshold + icon.di_->threshold_ < mapDistance && + (icon.di_->threshold_.value() >= 0.0 || + -(icon.di_->threshold_) > mapDistance)) || ( // Geo icon has a start time diff --git a/scwx-qt/source/scwx/qt/gl/draw/geo_lines.cpp b/scwx-qt/source/scwx/qt/gl/draw/geo_lines.cpp index d9f2c023..4b5fc05f 100644 --- a/scwx-qt/source/scwx/qt/gl/draw/geo_lines.cpp +++ b/scwx-qt/source/scwx/qt/gl/draw/geo_lines.cpp @@ -740,8 +740,10 @@ bool GeoLines::RunMousePicking( units::length::nautical_miles {line.di_->threshold_} .value())) < 999 && - // Map distance is beyond the threshold - line.di_->threshold_ < mapDistance) || + // Map distance is beyond/within the threshold + line.di_->threshold_ < mapDistance && + (line.di_->threshold_.value() >= 0.0 || + -(line.di_->threshold_) > mapDistance)) || ( // Line has a start time