From ef7befdbd8b0d30e6ce121f4348799692b66d0ba Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 19 May 2013 14:49:25 +0000 Subject: (svn r25264) -Feature: linkgraph overlay over main viewport (fonsinchen) --- src/linkgraph/linkgraph_gui.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/linkgraph') diff --git a/src/linkgraph/linkgraph_gui.cpp b/src/linkgraph/linkgraph_gui.cpp index 0d643bc68..736b5733e 100644 --- a/src/linkgraph/linkgraph_gui.cpp +++ b/src/linkgraph/linkgraph_gui.cpp @@ -11,6 +11,7 @@ #include "../stdafx.h" #include "../window_gui.h" +#include "../window_func.h" #include "../company_base.h" #include "../company_gui.h" #include "../date_func.h" @@ -268,7 +269,12 @@ void LinkGraphOverlay::DrawStationDots(const DrawPixelInfo *dpi) const */ Point LinkGraphOverlay::GetStationMiddle(const Station *st) const { - return static_cast(this->window)->GetStationMiddle(st); + if (this->window->viewport != NULL) { + return GetViewportStationMiddle(this->window->viewport, st); + } else { + /* assume this is a smallmap */ + return static_cast(this->window)->GetStationMiddle(st); + } } /** @@ -393,7 +399,7 @@ LinkGraphLegendWindow::LinkGraphLegendWindow(const WindowDesc *desc, int window_ { this->InitNested(desc, window_number); this->InvalidateData(0); - //this->SetOverlay(FindWindowById(WC_MAIN_WINDOW, 0)->viewport->overlay); + this->SetOverlay(FindWindowById(WC_MAIN_WINDOW, 0)->viewport->overlay); } /** -- cgit v1.2.3-70-g09d2