From 2a18e92724ebb6206a56a43f63c2030fa4d8e3a1 Mon Sep 17 00:00:00 2001 From: Kristin Date: Tue, 10 Mar 2020 14:58:18 -0700 Subject: [PATCH] Fix missed ProcessImportPds base references and update CMakelists to move translation files from the ISIS3/isis/src/missionName/translations level --- isis/CMakeLists.txt | 3 ++- .../base/objs/ProcessImportPds/ProcessImportPds.cpp | 13 +++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/isis/CMakeLists.txt b/isis/CMakeLists.txt index 318d3933f0..49c6a9558f 100644 --- a/isis/CMakeLists.txt +++ b/isis/CMakeLists.txt @@ -507,7 +507,8 @@ add_dependencies(isis3 incs) add_custom_target(appdata ALL COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/appdata/serialnumbers/*.trn ${CMAKE_SOURCE_DIR}/appdata/translations/*.trn ${CMAKE_SOURCE_DIR}/appdata/translations/*.typ ${CMAKE_SOURCE_DIR}/src/*/apps/*/*.typ - ${CMAKE_SOURCE_DIR}/src/*/apps/*/*.trn ${CMAKE_SOURCE_DIR}/src/*/apps/*/*.pft + ${CMAKE_SOURCE_DIR}/src/*/apps/*/*.trn ${CMAKE_SOURCE_DIR}/src/*/translations/*.trn + ${CMAKE_SOURCE_DIR}/src/*/apps/*/*.pft ${CMAKE_BINARY_DIR}/appdata/translations) add_dependencies(isis3 appdata) diff --git a/isis/src/base/objs/ProcessImportPds/ProcessImportPds.cpp b/isis/src/base/objs/ProcessImportPds/ProcessImportPds.cpp index 1dc6b97136..93d4e9cc35 100644 --- a/isis/src/base/objs/ProcessImportPds/ProcessImportPds.cpp +++ b/isis/src/base/objs/ProcessImportPds/ProcessImportPds.cpp @@ -60,7 +60,6 @@ namespace Isis { p_projectionOffsetGroup.setName("ProjectionOffsets"); // Set up a translater for PDS file of type IMAGE - Isis::PvlGroup &dataDir = Isis::Preference::Preferences().findGroup("DataDirectory"); p_transDir = "$ISISROOT/appdata"; } @@ -1463,13 +1462,12 @@ namespace Isis { /** * Fill as many of the Isis3 BandBin labels as possible * - * @param lab The lable where the translated Isis2 keywords will + * @param lab The label where the translated Isis2 keywords will * be placed */ void ProcessImportPds::TranslateIsis2BandBin(Isis::Pvl &lab) { // Set up a translater for Isis2 labels - Isis::PvlGroup &dataDir = Isis::Preference::Preferences().findGroup("DataDirectory"); - QString transDir = (QString) dataDir["Base"]; + QString transDir = "$ISISROOT/appdata"; Isis::FileName transFile(transDir + "/" + "translations/isis2bandbin.trn"); Isis::PvlToPvlTranslationManager isis2Xlater(p_pdsLabel, transFile.expanded()); @@ -1487,8 +1485,8 @@ namespace Isis { */ void ProcessImportPds::TranslateIsis2Instrument(Isis::Pvl &lab) { // Set up a translater for Isis2 labels - Isis::PvlGroup &dataDir = Isis::Preference::Preferences().findGroup("DataDirectory"); - QString transDir = (QString) dataDir["Base"]; + QString transDir = "$ISISROOT/appdata"; + Isis::FileName transFile(transDir + "/" + "translations/isis2instrument.trn"); Isis::PvlToPvlTranslationManager isis2Xlater(p_pdsLabel, transFile.expanded()); @@ -1599,8 +1597,7 @@ namespace Isis { Isis::PvlToPvlTranslationManager projType(p_pdsLabel, trnsStrm); // Set up the correct projection translation table for this label - Isis::PvlGroup &dataDir = Isis::Preference::Preferences().findGroup("DataDirectory"); - QString transDir = (QString) dataDir["Base"]; + QString transDir = "$ISISROOT/appdata"; Isis::FileName transFile; if (projType.InputHasKeyword("PdsProjectionTypeImage")) {