Mercurial > hg > openttd
diff src/station_gui.cpp @ 9116:44beb31166aa draft
(svn r12976) -Codechange: use w->SetDirty() instead of SetWindowDirty(w) when it's certain that w != NULL.
author | rubidium <rubidium@openttd.org> |
---|---|
date | Tue, 06 May 2008 22:08:18 +0000 |
parents | d48433370037 |
children | 00b40c2158ff |
line wrap: on
line diff
--- a/src/station_gui.cpp +++ b/src/station_gui.cpp @@ -195,7 +195,7 @@ Window *w = *wz; if (w->window_class == WC_STATION_LIST) { WP(w, plstations_d).flags |= sl_flag; - SetWindowDirty(w); + w->SetDirty(); } } } @@ -449,7 +449,7 @@ } w->SetWidgetLoweredState(SLW_FACILALL, facilities == (FACIL_TRAIN | FACIL_TRUCK_STOP | FACIL_BUS_STOP | FACIL_AIRPORT | FACIL_DOCK)); sl->flags |= SL_REBUILD; - SetWindowDirty(w); + w->SetDirty(); break; case SLW_FACILALL: @@ -460,7 +460,7 @@ facilities = FACIL_TRAIN | FACIL_TRUCK_STOP | FACIL_BUS_STOP | FACIL_AIRPORT | FACIL_DOCK; sl->flags |= SL_REBUILD; - SetWindowDirty(w); + w->SetDirty(); break; case SLW_CARGOALL: { @@ -476,7 +476,7 @@ _cargo_filter = _cargo_mask; include_empty = true; sl->flags |= SL_REBUILD; - SetWindowDirty(w); + w->SetDirty(); break; } @@ -486,7 +486,7 @@ sl->flags |= SL_RESORT; w->flags4 |= 5 << WF_TIMEOUT_SHL; w->LowerWidget(SLW_SORTBY); - SetWindowDirty(w); + w->SetDirty(); break; case SLW_SORTDROPBTN: // select sorting criteria dropdown menu @@ -509,7 +509,7 @@ } sl->flags |= SL_REBUILD; w->SetWidgetLoweredState(SLW_CARGOALL, _cargo_filter == _cargo_mask && include_empty); - SetWindowDirty(w); + w->SetDirty(); break; default: @@ -540,7 +540,7 @@ } sl->flags |= SL_REBUILD; w->SetWidgetLoweredState(SLW_CARGOALL, _cargo_filter == _cargo_mask && include_empty); - SetWindowDirty(w); + w->SetDirty(); } break; } @@ -553,7 +553,7 @@ station_sort.criteria = sl->sort_type; sl->flags |= SL_RESORT; } - SetWindowDirty(w); + w->SetDirty(); break; case WE_TICK: @@ -562,13 +562,13 @@ DEBUG(misc, 3, "Periodic rebuild station list player %d", owner); sl->resort_timer = DAY_TICKS * PERIODIC_RESORT_DAYS; sl->flags |= SL_REBUILD; - SetWindowDirty(w); + w->SetDirty(); } break; case WE_TIMEOUT: w->RaiseWidget(SLW_SORTBY); - SetWindowDirty(w); + w->SetDirty(); break; case WE_RESIZE: @@ -949,7 +949,7 @@ break; case SVW_RATINGS: - SetWindowDirty(w); + w->SetDirty(); if (w->widget[SVW_RATINGS].data == STR_3032_RATINGS) { /* Switch to ratings view */ @@ -963,7 +963,7 @@ ResizeWindowForWidget(w, SVW_ACCEPTLIST, 0, -100); } - SetWindowDirty(w); + w->SetDirty(); break; case SVW_RENAME: