From 1ba60d684f6f53a397f03c074265665853949cfe Mon Sep 17 00:00:00 2001 From: acpaquette Date: Fri, 18 Aug 2023 16:02:49 -0700 Subject: [PATCH] Campt attribute fix (#5269) * Prevent cube manager from setting the virtual band * Pass potential cube attributes through to the cube manager in campt * Added changelog entry * Fixed change log entry --- CHANGELOG.md | 1 + isis/src/base/apps/campt/campt.cpp | 9 ++++++++- isis/src/base/objs/CubeManager/CubeManager.cpp | 2 -- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d03ab7b129..d5b5dd3cb2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -65,6 +65,7 @@ release. - Fixed a bug in the cnetwinnow test that did not clean/remove it during test runs. - Fixed findfeatures instantiation and use of projection classes to correctly return geometry data from projected images and mosaics. [#4772](https://github.com/DOI-USGS/ISIS3/issues/4772) - Fixed `cubeit` attribute error to allow attribute specification on the output cube filename [#5234](https://github.com/DOI-USGS/ISIS3/issues/5234) +- Fixed `campt` to handle input band selection attribute correctly [#5234](https://github.com/DOI-USGS/ISIS3/issues/5235) ## [8.0.0] - 2023-04-19 diff --git a/isis/src/base/apps/campt/campt.cpp b/isis/src/base/apps/campt/campt.cpp index 6d79429c1e..bcee9fedfe 100644 --- a/isis/src/base/apps/campt/campt.cpp +++ b/isis/src/base/apps/campt/campt.cpp @@ -42,7 +42,14 @@ namespace Isis{ else campt.SetCSVOutput(true); - campt.SetCube(cube->fileName()); + QString inputCubePath = ""; + try { + inputCubePath = ui.GetCubeName("FROM"); + } + catch (IException &e) { + inputCubePath = cube->fileName(); + } + campt.SetCube(inputCubePath); // Grab the provided points (coordinates) QList< QPair > points = getPoints(ui, ui.WasEntered("COORDLIST")); diff --git a/isis/src/base/objs/CubeManager/CubeManager.cpp b/isis/src/base/objs/CubeManager/CubeManager.cpp index 0f93b7997e..a80c7858f8 100644 --- a/isis/src/base/objs/CubeManager/CubeManager.cpp +++ b/isis/src/base/objs/CubeManager/CubeManager.cpp @@ -109,8 +109,6 @@ namespace Isis { if (searchResult == p_cubes.end()) { p_cubes.insert(fileName, new Cube()); searchResult = p_cubes.find(fileName); - // Bands are the only thing input attributes can affect - (*searchResult)->setVirtualBands(attIn.bands()); // Need to clean up memory if there is a problem opening a cube // This allows the CubeManager class to clean up the dynamically alloc'd -- GitLab