From bf0158d8f1f704cc4bd614c40242cd7b1ee21440 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Tue, 22 Jun 2021 08:46:38 +0100 Subject: [PATCH] Fix news window viewports not updating vehicle images --- src/news_gui.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/news_gui.cpp b/src/news_gui.cpp index f04fc46708..ff225a052a 100644 --- a/src/news_gui.cpp +++ b/src/news_gui.cpp @@ -559,8 +559,11 @@ private: int mintop = std::min(newtop, this->top); int maxtop = std::max(newtop, this->top); - if (this->viewport != nullptr) this->viewport->top += newtop - this->top; this->top = newtop; + if (this->viewport != nullptr) { + NWidgetViewport *nvp = this->GetWidget(WID_N_VIEWPORT); + nvp->UpdateViewportCoordinates(this); + } SetDirtyBlocks(this->left, mintop, this->left + this->width, maxtop + this->height); }