Fix #7004: Mark linkgraph dirty to be rebuilt on next draw call. (#7265)

Previously the linkgraph was rebuilt before the viewport extents were finalized.
This commit is contained in:
PeterN
2019-02-23 19:19:41 +00:00
committed by GitHub
parent f240f61fb2
commit 87ebfe1227
5 changed files with 17 additions and 9 deletions

View File

@@ -239,8 +239,12 @@ void LinkGraphOverlay::AddLinks(const Station *from, const Station *to)
* Draw the linkgraph overlay or some part of it, in the area given.
* @param dpi Area to be drawn to.
*/
void LinkGraphOverlay::Draw(const DrawPixelInfo *dpi) const
void LinkGraphOverlay::Draw(const DrawPixelInfo *dpi)
{
if (this->dirty) {
this->RebuildCache();
this->dirty = false;
}
this->DrawLinks(dpi);
this->DrawStationDots(dpi);
}