Skip to content

Commit

Permalink
Campt attribute fix (#5269)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
acpaquette authored Aug 18, 2023
1 parent 53e3bc0 commit 1ba60d6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ release.
- Fixed a bug in the <i>cnetwinnow</i> test that did not clean/remove it during test runs.
- Fixed <i>findfeatures</i> 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

Expand Down
9 changes: 8 additions & 1 deletion isis/src/base/apps/campt/campt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<double, double> > points = getPoints(ui, ui.WasEntered("COORDLIST"));
Expand Down
2 changes: 0 additions & 2 deletions isis/src/base/objs/CubeManager/CubeManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1ba60d6

Please sign in to comment.