mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 23:30:04 +00:00
Update the map widget when requested by a layer
This commit is contained in:
parent
ad4c402404
commit
320857328c
2 changed files with 8 additions and 0 deletions
|
|
@ -45,6 +45,9 @@ public:
|
||||||
const QPointF& mouseGlobalPos,
|
const QPointF& mouseGlobalPos,
|
||||||
const glm::vec2& mouseCoords);
|
const glm::vec2& mouseCoords);
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void NeedsRendering();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::shared_ptr<MapContext> context() const;
|
std::shared_ptr<MapContext> context() const;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -969,6 +969,11 @@ void MapWidgetImpl::AddLayer(const std::string& id,
|
||||||
|
|
||||||
layerList_.push_back(id);
|
layerList_.push_back(id);
|
||||||
genericLayers_.push_back(layer);
|
genericLayers_.push_back(layer);
|
||||||
|
|
||||||
|
connect(layer.get(),
|
||||||
|
&GenericLayer::NeedsRendering,
|
||||||
|
widget_,
|
||||||
|
[this]() { widget_->update(); });
|
||||||
}
|
}
|
||||||
catch (const std::exception&)
|
catch (const std::exception&)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue