Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add inverted threshold to mouse picking #323

Merged
merged 2 commits into from
Dec 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
6 changes: 4 additions & 2 deletions scwx-qt/source/scwx/qt/gl/draw/placefile_icons.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -737,8 +737,10 @@ bool PlacefileIcons::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)) ||

(
// Line has a start time
Expand Down
6 changes: 4 additions & 2 deletions scwx-qt/source/scwx/qt/gl/draw/placefile_lines.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -544,8 +544,10 @@ bool PlacefileLines::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