From 7edf07d9214518e1294d3caa23fc5a770009ee5f Mon Sep 17 00:00:00 2001 From: Austin Sanders Date: Tue, 23 Jul 2024 10:43:30 -0600 Subject: [PATCH] Find QView's FindTool UniversalGroundMap priority to Projection (#5555) * Change FindTool's UniversalGroundMap priority to Projection * Updated changelog --- CHANGELOG.md | 1 + isis/src/qisis/objs/FindTool/FindTool.cpp | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 463ccbaa40..453bc0be08 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,7 @@ release. ### Fixed +- Fixed a bug in QVIEW's FindTool in which camera was prioritized over projction [#5508](https://github.com/DOI-USGS/ISIS3/issues/5508) - Fixed a bug in PolygonTools in which the program exited before attempting to fix an invalid Polygon [#5520](https://github.com/DOI-USGS/ISIS3/issues/5520) - Fixed a bug in QVIEW's Stretch tool where the default min/max type was not an available option [#5289](https://github.com/DOI-USGS/ISIS3/issues/5289) - Fixed a bug in QVIEW where images would double load if loaded from the commandline [#5505](https://github.com/DOI-USGS/ISIS3/pull/5505) diff --git a/isis/src/qisis/objs/FindTool/FindTool.cpp b/isis/src/qisis/objs/FindTool/FindTool.cpp index 7e5b0fba57..1bf8a3a62a 100644 --- a/isis/src/qisis/objs/FindTool/FindTool.cpp +++ b/isis/src/qisis/objs/FindTool/FindTool.cpp @@ -631,9 +631,10 @@ namespace Isis { */ Distance FindTool::distancePerPixel(MdiCubeViewport *viewport, double lat, double lon) { - UniversalGroundMap *groundMap = viewport->universalGroundMap(); + // UniversalGroundMaps default to camera priority, so create a new one so that we can use projection if it exists. + std::unique_ptr groundMap(new UniversalGroundMap(*(viewport->cube()), UniversalGroundMap::ProjectionFirst)); Distance viewportResolution; - if (viewport->camera() != NULL){ + if (groundMap->Camera() != NULL){ if (groundMap->Camera()->target()->isSky()) { return Distance(groundMap->Camera()->RaDecResolution(), Distance::Units::Meters); }