summaryrefslogtreecommitdiff
path: root/src/waypoint_gui.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2008-08-23 16:34:05 +0000
committerfrosch <frosch@openttd.org>2008-08-23 16:34:05 +0000
commit6b9b879a2c5d08219df6f38ab29d014fa1c60729 (patch)
tree3da2113edeaae358b099bd876c7435fd509197a2 /src/waypoint_gui.cpp
parentbb85d482d8e06628d3e7c0821fa6a9d5f127e30e (diff)
downloadopenttd-6b9b879a2c5d08219df6f38ab29d014fa1c60729.tar.xz
(svn r14143) -Codechange: Recenter viewport of waypoint window when relocating the waypoint.
Diffstat (limited to 'src/waypoint_gui.cpp')
-rw-r--r--src/waypoint_gui.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/waypoint_gui.cpp b/src/waypoint_gui.cpp
index 75d9d4798..f1a1c23c1 100644
--- a/src/waypoint_gui.cpp
+++ b/src/waypoint_gui.cpp
@@ -77,6 +77,13 @@ public:
}
}
+ virtual void OnInvalidateData(int data)
+ {
+ int x = TileX(this->wp->xy) * TILE_SIZE;
+ int y = TileY(this->wp->xy) * TILE_SIZE;
+ ScrollWindowTo(x,y, this);
+ }
+
virtual void OnQueryTextFinished(char *str)
{
if (!StrEmpty(str)) {