From e2cb62452153dc239fdd592ff8fd202cff38bf32 Mon Sep 17 00:00:00 2001 From: Paul Gilman Date: Mon, 29 Jun 2026 14:58:55 -0700 Subject: [PATCH] Reverts wxConfig to NREL for backward compatibility This avoids issue with information written to Windows registry and Mac/Linux config files not being correctly loaded for 2026 versions of SAM/DView and later. An alternative approach would be to add a condition when "NREL" entries in the Windows registry or Mac/Linux configuration files exist to read them and copy them to new "NLR" entries. The alternative approach would require more time and testing to implement than this simple approach of preserving the "NREL" entries. --- src/dview/dvdcctrl.cpp | 4 ++-- src/dview/dvdmapctrl.cpp | 4 ++-- src/dview/dvpncdfctrl.cpp | 4 ++-- src/dview/dvprofilectrl.cpp | 4 ++-- src/dview/dvscatterplotctrl.cpp | 4 ++-- src/dview/dvstatisticstablectrl.cpp | 4 ++-- src/dview/dvtimeseriesctrl.cpp | 4 ++-- tools/dview/dview.cpp | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/dview/dvdcctrl.cpp b/src/dview/dvdcctrl.cpp index 8a439524..9146b4f2 100644 --- a/src/dview/dvdcctrl.cpp +++ b/src/dview/dvdcctrl.cpp @@ -85,7 +85,7 @@ wxDVDCCtrl::~wxDVDCCtrl() { } void wxDVDCCtrl::ReadState(std::string filename) { - wxConfig cfg("DView", "NLR"); + wxConfig cfg("DView", "NREL"); wxString s; bool success; @@ -111,7 +111,7 @@ void wxDVDCCtrl::ReadState(std::string filename) { } void wxDVDCCtrl::WriteState(std::string filename) { - wxConfig cfg("DView", "NLR"); + wxConfig cfg("DView", "NREL"); bool success; bool debugging = false; diff --git a/src/dview/dvdmapctrl.cpp b/src/dview/dvdmapctrl.cpp index f4d75027..cdda3292 100644 --- a/src/dview/dvdmapctrl.cpp +++ b/src/dview/dvdmapctrl.cpp @@ -306,7 +306,7 @@ wxDVDMapCtrl::~wxDVDMapCtrl() { } void wxDVDMapCtrl::ReadState(std::string filename) { - wxConfig cfg("DView", "NLR"); + wxConfig cfg("DView", "NREL"); wxString s; bool success; @@ -384,7 +384,7 @@ void wxDVDMapCtrl::OnTimer(wxTimerEvent &) { } void wxDVDMapCtrl::WriteState(std::string filename) { - wxConfig cfg("DView", "NLR"); + wxConfig cfg("DView", "NREL"); bool success; bool debugging = false; diff --git a/src/dview/dvpncdfctrl.cpp b/src/dview/dvpncdfctrl.cpp index ef67d113..efe8c7fc 100644 --- a/src/dview/dvpncdfctrl.cpp +++ b/src/dview/dvpncdfctrl.cpp @@ -200,7 +200,7 @@ wxDVPnCdfCtrl::~wxDVPnCdfCtrl() { } void wxDVPnCdfCtrl::ReadState(std::string filename) { - wxConfig cfg("DView", "NLR"); + wxConfig cfg("DView", "NREL"); wxString s; bool success; @@ -272,7 +272,7 @@ void wxDVPnCdfCtrl::ReadState(std::string filename) { } void wxDVPnCdfCtrl::WriteState(std::string filename) { - wxConfig cfg("DView", "NLR"); + wxConfig cfg("DView", "NREL"); bool success; bool debugging = false; diff --git a/src/dview/dvprofilectrl.cpp b/src/dview/dvprofilectrl.cpp index 542396b9..6d3d4f17 100644 --- a/src/dview/dvprofilectrl.cpp +++ b/src/dview/dvprofilectrl.cpp @@ -279,7 +279,7 @@ wxDVProfileCtrl::~wxDVProfileCtrl() { } void wxDVProfileCtrl::ReadState(std::string filename) { - wxConfig cfg("DView", "NLR"); + wxConfig cfg("DView", "NREL"); wxString s; bool success; @@ -337,7 +337,7 @@ void wxDVProfileCtrl::OnTimer(wxTimerEvent &) { } void wxDVProfileCtrl::WriteState(std::string filename) { - wxConfig cfg("DView", "NLR"); + wxConfig cfg("DView", "NREL"); bool success; bool debugging = false; diff --git a/src/dview/dvscatterplotctrl.cpp b/src/dview/dvscatterplotctrl.cpp index f6dfd958..b768f0d1 100644 --- a/src/dview/dvscatterplotctrl.cpp +++ b/src/dview/dvscatterplotctrl.cpp @@ -131,7 +131,7 @@ wxDVScatterPlotCtrl::~wxDVScatterPlotCtrl() { } void wxDVScatterPlotCtrl::ReadState(std::string filename) { - wxConfig cfg("DView", "NLR"); + wxConfig cfg("DView", "NREL"); wxString s; bool success; @@ -182,7 +182,7 @@ void wxDVScatterPlotCtrl::ReadState(std::string filename) { } void wxDVScatterPlotCtrl::WriteState(std::string filename) { - wxConfig cfg("DView", "NLR"); + wxConfig cfg("DView", "NREL"); bool success; bool debugging = false; diff --git a/src/dview/dvstatisticstablectrl.cpp b/src/dview/dvstatisticstablectrl.cpp index c9210c65..565a6c4a 100644 --- a/src/dview/dvstatisticstablectrl.cpp +++ b/src/dview/dvstatisticstablectrl.cpp @@ -452,7 +452,7 @@ wxDVStatisticsTableCtrl::~wxDVStatisticsTableCtrl(void) { } void wxDVStatisticsTableCtrl::ReadState(std::string filename) { - wxConfig cfg("DView", "NLR"); + wxConfig cfg("DView", "NREL"); wxString s; bool success; @@ -470,7 +470,7 @@ void wxDVStatisticsTableCtrl::ReadState(std::string filename) { } void wxDVStatisticsTableCtrl::WriteState(std::string filename) { - wxConfig cfg("DView", "NLR"); + wxConfig cfg("DView", "NREL"); bool success; bool debugging = false; diff --git a/src/dview/dvtimeseriesctrl.cpp b/src/dview/dvtimeseriesctrl.cpp index 01c0dbb4..5f259e81 100644 --- a/src/dview/dvtimeseriesctrl.cpp +++ b/src/dview/dvtimeseriesctrl.cpp @@ -858,7 +858,7 @@ wxDVTimeSeriesCtrl::~wxDVTimeSeriesCtrl(void) { } void wxDVTimeSeriesCtrl::ReadState(std::string filename) { - wxConfig cfg("DView", "NLR"); + wxConfig cfg("DView", "NREL"); // Note: on Mac, these settings are stored in a plist file, // "DView Preferences" in folder ~/Library/Preferences. @@ -984,7 +984,7 @@ void wxDVTimeSeriesCtrl::OnTimer(wxTimerEvent &) { } void wxDVTimeSeriesCtrl::WriteState(std::string filename) { - wxConfig cfg("DView", "NLR"); + wxConfig cfg("DView", "NREL"); bool success; bool debugging = false; diff --git a/tools/dview/dview.cpp b/tools/dview/dview.cpp index aeba494e..69c41760 100644 --- a/tools/dview/dview.cpp +++ b/tools/dview/dview.cpp @@ -116,7 +116,7 @@ class DViewFrame : public wxFrame { mPlotCtrl = new wxDVPlotCtrl(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0); mPlotCtrl->DisplayTabs(); - wxConfig cfg("DView", "NLR"); + wxConfig cfg("DView", "NREL"); long ct = 0; if (cfg.Read("RecentCount", &ct)) mRecentCount = (int) ct; @@ -262,7 +262,7 @@ class DViewFrame : public wxFrame { long ct = (long) mRecentCount; - wxConfig cfg("DView", "NLR"); + wxConfig cfg("DView", "NREL"); cfg.Write("RecentCount", ct); for (int i = 0; i < mRecentCount; i++) { wxString key;