diff --git a/scwx-qt/source/scwx/qt/main/main_window.cpp b/scwx-qt/source/scwx/qt/main/main_window.cpp index e6661f83..fd72560c 100644 --- a/scwx-qt/source/scwx/qt/main/main_window.cpp +++ b/scwx-qt/source/scwx/qt/main/main_window.cpp @@ -119,7 +119,7 @@ MainWindow::MainWindow(QWidget* parent) : ui->declutterCheckbox->setVisible(false); p->SelectRadarProduct(p->activeMap_, common::Level2Product::Reflectivity); - if (p->maps_.at(1) != nullptr) + if (p->maps_.size() > 1 && p->maps_.at(1) != nullptr) { p->SelectRadarProduct(p->maps_.at(1), common::Level2Product::Velocity); } @@ -466,7 +466,9 @@ void MainWindowImpl::UpdateRadarProductSelection( UpdateLevel2ProductSelection(common::GetLevel2Product(product)); break; - default: UpdateLevel2ProductSelection(common::Level2Product::Unknown); break; + default: + UpdateLevel2ProductSelection(common::Level2Product::Unknown); + break; } } diff --git a/scwx-qt/source/scwx/qt/settings/palette_settings.cpp b/scwx-qt/source/scwx/qt/settings/palette_settings.cpp index b3c25b37..c66de6ae 100644 --- a/scwx-qt/source/scwx/qt/settings/palette_settings.cpp +++ b/scwx-qt/source/scwx/qt/settings/palette_settings.cpp @@ -13,7 +13,7 @@ namespace settings static const std::string logPrefix_ = "[scwx::qt::settings::palette_settings] "; static const std::vector paletteNames_ = { - "BR", "BV", "SW", "ZDR", "PHI", "CC", "???"}; + "BR", "BV", "SW", "ZDR", "PHI", "CC", "STP", "???"}; static const std::string DEFAULT_KEY = "Default"; static const std::string DEFAULT_PALETTE = ""; @@ -27,10 +27,10 @@ public: void SetDefaults() { - std::for_each( - paletteNames_.cbegin(), - paletteNames_.cend(), - [&](const std::string& name) { palette_[name] = DEFAULT_PALETTE; }); + std::for_each(paletteNames_.cbegin(), + paletteNames_.cend(), + [&](const std::string& name) + { palette_[name] = DEFAULT_PALETTE; }); } std::unordered_map palette_; @@ -66,10 +66,10 @@ boost::json::value PaletteSettings::ToJson() const { boost::json::object json; - std::for_each( - paletteNames_.cbegin(), - paletteNames_.cend(), - [&](const std::string& name) { json[name] = p->palette_[name]; }); + std::for_each(paletteNames_.cbegin(), + paletteNames_.cend(), + [&](const std::string& name) + { json[name] = p->palette_[name]; }); return json; } @@ -94,7 +94,8 @@ PaletteSettings::Load(const boost::json::value* json, bool& jsonDirty) { std::for_each(paletteNames_.cbegin(), paletteNames_.cend(), - [&](const std::string& name) { + [&](const std::string& name) + { jsonDirty |= !util::json::FromJsonString( json->as_object(), name, diff --git a/test/data b/test/data index 19cd558c..c82e2471 160000 --- a/test/data +++ b/test/data @@ -1 +1 @@ -Subproject commit 19cd558cb25114221d2fce69b26eee912cd0d232 +Subproject commit c82e24718e7d5a0ae0c47b460240990a1187b383 diff --git a/wxdata/source/scwx/common/products.cpp b/wxdata/source/scwx/common/products.cpp index 3af22124..78c4e61c 100644 --- a/wxdata/source/scwx/common/products.cpp +++ b/wxdata/source/scwx/common/products.cpp @@ -43,16 +43,16 @@ static const std::unordered_map level2Palette_ { {Level2Product::Unknown, "???"}}; static const std::unordered_map level3Palette_ { - {19, "BR"}, {20, "BR"}, {27, "BV"}, {30, "SW"}, {31, "???"}, + {19, "BR"}, {20, "BR"}, {27, "BV"}, {30, "SW"}, {31, "STP"}, {32, "BR"}, {37, "BR"}, {38, "BR"}, {41, "???"}, {50, "BR"}, {51, "BV"}, {56, "BV"}, {57, "???"}, {65, "BR"}, {66, "BR"}, - {67, "BR"}, {78, "???"}, {79, "???"}, {80, "???"}, {81, "???"}, + {67, "BR"}, {78, "STP"}, {79, "STP"}, {80, "STP"}, {81, "???"}, {86, "BV"}, {90, "BR"}, {93, "BV"}, {94, "BR"}, {97, "BR"}, {98, "BR"}, {99, "BV"}, {113, "???"}, {132, "???"}, {133, "???"}, - {134, "???"}, {135, "???"}, {137, "BR"}, {138, "???"}, {144, "???"}, - {145, "???"}, {146, "???"}, {150, "???"}, {151, "???"}, {153, "BR"}, + {134, "???"}, {135, "???"}, {137, "BR"}, {138, "???"}, {144, "STP"}, + {145, "STP"}, {146, "STP"}, {150, "STP"}, {151, "STP"}, {153, "BR"}, {154, "BV"}, {155, "SW"}, {159, "ZDR"}, {161, "CC"}, {163, "PHI"}, - {165, "???"}, {167, "CC"}, {168, "PHI"}, {169, "???"}, {170, "???"}, + {165, "???"}, {167, "CC"}, {168, "PHI"}, {169, "STP"}, {170, "???"}, {171, "???"}, {172, "???"}, {173, "???"}, {174, "???"}, {175, "???"}, {176, "???"}, {177, "???"}, {178, "???"}, {179, "???"}, {180, "BR"}, {181, "BR"}, {182, "BV"}, {184, "SW"}, {186, "BR"}, {193, "BR"},