Placefile "Remove" functionality

This commit is contained in:
Dan Paulat 2023-08-22 23:52:55 -05:00
parent 9955c4ccbe
commit ad5c2b583d
6 changed files with 115 additions and 2 deletions

View file

@ -227,6 +227,19 @@ void MapWidgetImpl::ConnectSignals()
}
widget_->update();
});
connect(placefileManager_.get(),
&manager::PlacefileManager::PlacefileRemoved,
widget_,
[this](const std::string& name)
{
if (enabledPlacefiles_.contains(name))
{
// Placefile removed, remove layer
enabledPlacefiles_.erase(name);
RemovePlacefileLayer(name);
}
widget_->update();
});
connect(placefileManager_.get(),
&manager::PlacefileManager::PlacefileRenamed,
widget_,