diff --git a/scwx-qt/source/scwx/qt/map/map_widget.cpp b/scwx-qt/source/scwx/qt/map/map_widget.cpp index a3f50c8f..7a7f37bc 100644 --- a/scwx-qt/source/scwx/qt/map/map_widget.cpp +++ b/scwx-qt/source/scwx/qt/map/map_widget.cpp @@ -4,7 +4,7 @@ #include #include #include -#include +#include #include #include #include @@ -79,7 +79,6 @@ public: imGuiRendererInitialized_ {false}, radarProductManager_ {nullptr}, radarProductLayer_ {nullptr}, - alertLayer_ {std::make_shared(context_)}, overlayLayer_ {nullptr}, placefileLayer_ {nullptr}, colorTableLayer_ {nullptr}, @@ -218,7 +217,6 @@ public: std::shared_ptr radarProductManager_; std::shared_ptr radarProductLayer_; - std::shared_ptr alertLayer_; std::shared_ptr overlayLayer_; std::shared_ptr overlayProductLayer_ {nullptr}; std::shared_ptr placefileLayer_; @@ -1180,10 +1178,11 @@ void MapWidgetImpl::AddLayer(types::LayerType type, } else if (type == types::LayerType::Alert) { - // Add the alert layer for the phenomenon - auto newLayers = alertLayer_->AddLayers( - std::get(description), before); - layerList_.insert(layerList_.end(), newLayers.cbegin(), newLayers.cend()); + auto phenomenon = std::get(description); + + AddLayer(fmt::format("alert.{}", awips::GetPhenomenonCode(phenomenon)), + std::make_shared(context_, phenomenon), + before); } else if (type == types::LayerType::Placefile) {