summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2006-10-10 08:24:29 +0000
committerbjarni <bjarni@openttd.org>2006-10-10 08:24:29 +0000
commit67ac92e6528a95f8eb3c6a5a315f24bd6e02475b (patch)
treead645729c61e983bfbae94c41782b4f273e32100
parent3dfe48b1892dc160efc1d1d0f6a6efdf732021ea (diff)
downloadopenttd-67ac92e6528a95f8eb3c6a5a315f24bd6e02475b.tar.xz
(svn r6715) -Fix r6714: roadvehicle and ship building windows are now also marked dirty when getting a WE_INVALIDATE_DATA event
This will make the windows mark dirty again when a new vehicle is available or one is removed from the list (again)
-rw-r--r--roadveh_gui.c4
-rw-r--r--ship_gui.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/roadveh_gui.c b/roadveh_gui.c
index 3f853483c..e86127205 100644
--- a/roadveh_gui.c
+++ b/roadveh_gui.c
@@ -453,6 +453,10 @@ void CcBuildRoadVeh(bool success, TileIndex tile, uint32 p1, uint32 p2)
static void NewRoadVehWndProc(Window *w, WindowEvent *e)
{
switch (e->event) {
+ case WE_INVALIDATE_DATA:
+ SetWindowDirty(w);
+ break;
+
case WE_PAINT:
DrawNewRoadVehWindow(w);
break;
diff --git a/ship_gui.c b/ship_gui.c
index 48867bb46..3d16ec0b2 100644
--- a/ship_gui.c
+++ b/ship_gui.c
@@ -244,6 +244,10 @@ void CcCloneShip(bool success, TileIndex tile, uint32 p1, uint32 p2)
static void NewShipWndProc(Window *w, WindowEvent *e)
{
switch (e->event) {
+ case WE_INVALIDATE_DATA:
+ SetWindowDirty(w);
+ break;
+
case WE_PAINT: {
EngineID selected_id;
EngineID eid;