Skip to content

Commit

Permalink
Add inverted threshold to mouse picking for geo icons/lines
Browse files Browse the repository at this point in the history
  • Loading branch information
AdenKoperczak committed Dec 19, 2024
1 parent ecf7579 commit 27f8c1f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions scwx-qt/source/scwx/qt/gl/draw/geo_icons.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -947,8 +947,10 @@ bool GeoIcons::RunMousePicking(
units::length::nautical_miles<double> {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
Expand Down
6 changes: 4 additions & 2 deletions scwx-qt/source/scwx/qt/gl/draw/geo_lines.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -740,8 +740,10 @@ bool GeoLines::RunMousePicking(
units::length::nautical_miles<double> {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
Expand Down

0 comments on commit 27f8c1f

Please sign in to comment.