diff --git a/scwx-qt/source/scwx/qt/map/generic_layer.hpp b/scwx-qt/source/scwx/qt/map/generic_layer.hpp index 239d271b..355680b8 100644 --- a/scwx-qt/source/scwx/qt/map/generic_layer.hpp +++ b/scwx-qt/source/scwx/qt/map/generic_layer.hpp @@ -45,6 +45,9 @@ public: const QPointF& mouseGlobalPos, const glm::vec2& mouseCoords); +signals: + void NeedsRendering(); + protected: std::shared_ptr context() const; diff --git a/scwx-qt/source/scwx/qt/map/map_widget.cpp b/scwx-qt/source/scwx/qt/map/map_widget.cpp index 7c543bdd..a897748b 100644 --- a/scwx-qt/source/scwx/qt/map/map_widget.cpp +++ b/scwx-qt/source/scwx/qt/map/map_widget.cpp @@ -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&) {