Update the map widget when requested by a layer

This commit is contained in:
Dan Paulat 2023-11-23 08:20:02 -06:00
parent ad4c402404
commit 320857328c
2 changed files with 8 additions and 0 deletions

View file

@ -45,6 +45,9 @@ public:
const QPointF& mouseGlobalPos,
const glm::vec2& mouseCoords);
signals:
void NeedsRendering();
protected:
std::shared_ptr<MapContext> context() const;

View file

@ -969,6 +969,11 @@ void MapWidgetImpl::AddLayer(const std::string& id,
layerList_.push_back(id);
genericLayers_.push_back(layer);
connect(layer.get(),
&GenericLayer::NeedsRendering,
widget_,
[this]() { widget_->update(); });
}
catch (const std::exception&)
{