Skip to content

Commit

Permalink
Only add placefile layers if the placefile is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
dpaulat committed Nov 3, 2023
1 parent 7e2fd7c commit c81d9d9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scwx-qt/source/scwx/qt/map/map_widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -859,8 +859,12 @@ void MapWidgetImpl::AddLayer(types::LayerType type,
}
else if (type == types::LayerType::Placefile)
{
// Add the placefile layer
AddPlacefileLayer(std::get<std::string>(description), before);
// If the placefile is enabled, add the placefile layer
std::string placefileName = std::get<std::string>(description);
if (placefileManager_->placefile_enabled(placefileName))
{
AddPlacefileLayer(placefileName, before);
}
}
else if (type == types::LayerType::Information)
{
Expand Down

0 comments on commit c81d9d9

Please sign in to comment.