From c81d9d9ba61f8b5ca85ef0f862ae768b43360df7 Mon Sep 17 00:00:00 2001 From: Dan Paulat Date: Fri, 3 Nov 2023 05:43:06 -0500 Subject: [PATCH] Only add placefile layers if the placefile is enabled --- scwx-qt/source/scwx/qt/map/map_widget.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scwx-qt/source/scwx/qt/map/map_widget.cpp b/scwx-qt/source/scwx/qt/map/map_widget.cpp index 35e4bd2e..ff5a53b4 100644 --- a/scwx-qt/source/scwx/qt/map/map_widget.cpp +++ b/scwx-qt/source/scwx/qt/map/map_widget.cpp @@ -859,8 +859,12 @@ void MapWidgetImpl::AddLayer(types::LayerType type, } else if (type == types::LayerType::Placefile) { - // Add the placefile layer - AddPlacefileLayer(std::get(description), before); + // If the placefile is enabled, add the placefile layer + std::string placefileName = std::get(description); + if (placefileManager_->placefile_enabled(placefileName)) + { + AddPlacefileLayer(placefileName, before); + } } else if (type == types::LayerType::Information) {