Skip to content

Commit 7edf07d

Browse files
Find QView's FindTool UniversalGroundMap priority to Projection (#5555)
* Change FindTool's UniversalGroundMap priority to Projection * Updated changelog
1 parent a59442f commit 7edf07d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ release.
4141

4242

4343
### Fixed
44+
- Fixed a bug in QVIEW's FindTool in which camera was prioritized over projction [#5508](https://github.com/DOI-USGS/ISIS3/issues/5508)
4445
- 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)
4546
- 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)
4647
- Fixed a bug in QVIEW where images would double load if loaded from the commandline [#5505](https://github.com/DOI-USGS/ISIS3/pull/5505)

isis/src/qisis/objs/FindTool/FindTool.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -631,9 +631,10 @@ namespace Isis {
631631
*/
632632
Distance FindTool::distancePerPixel(MdiCubeViewport *viewport,
633633
double lat, double lon) {
634-
UniversalGroundMap *groundMap = viewport->universalGroundMap();
634+
// UniversalGroundMaps default to camera priority, so create a new one so that we can use projection if it exists.
635+
std::unique_ptr<UniversalGroundMap> groundMap(new UniversalGroundMap(*(viewport->cube()), UniversalGroundMap::ProjectionFirst));
635636
Distance viewportResolution;
636-
if (viewport->camera() != NULL){
637+
if (groundMap->Camera() != NULL){
637638
if (groundMap->Camera()->target()->isSky()) {
638639
return Distance(groundMap->Camera()->RaDecResolution(), Distance::Units::Meters);
639640
}

0 commit comments

Comments
 (0)