diff options
author | rubidium <rubidium@openttd.org> | 2008-05-06 22:08:18 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-05-06 22:08:18 +0000 |
commit | 9bf519f26bc9b3e174803c8ebfd2427bf7c5fb61 (patch) | |
tree | 6760a7b433eda594e11470ba7695e8c399fadbfd /src/autoreplace_gui.cpp | |
parent | e6c944a6c4507ec00948391d1b0bdf300bbd879e (diff) | |
download | openttd-9bf519f26bc9b3e174803c8ebfd2427bf7c5fb61.tar.xz |
(svn r12976) -Codechange: use w->SetDirty() instead of SetWindowDirty(w) when it's certain that w != NULL.
Diffstat (limited to 'src/autoreplace_gui.cpp')
-rw-r--r-- | src/autoreplace_gui.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/autoreplace_gui.cpp b/src/autoreplace_gui.cpp index 0a0eaf805..1c7cfb000 100644 --- a/src/autoreplace_gui.cpp +++ b/src/autoreplace_gui.cpp @@ -368,9 +368,9 @@ static void ReplaceVehicleWndProc(Window *w, WindowEvent *e) int text_end = DrawVehiclePurchaseInfo(wi->left + 2, wi->top + 1, wi->right - wi->left - 2, WP(w, replaceveh_d).sel_engine[i]); if (text_end > wi->bottom) { - SetWindowDirty(w); + w->SetDirty(); ResizeWindowForWidget(w, i == 0 ? RVW_WIDGET_LEFT_DETAILS : RVW_WIDGET_RIGHT_DETAILS, 0, text_end - wi->bottom); - SetWindowDirty(w); + w->SetDirty(); } } } @@ -383,7 +383,7 @@ static void ReplaceVehicleWndProc(Window *w, WindowEvent *e) WP(w, replaceveh_d).wagon_btnstate = !(WP(w, replaceveh_d).wagon_btnstate); WP(w, replaceveh_d).update_left = true; WP(w, replaceveh_d).init_lists = true; - SetWindowDirty(w); + w->SetDirty(); break; case RVW_WIDGET_TRAIN_RAILTYPE_DROPDOWN: /* Railtype selection dropdown menu */ @@ -422,7 +422,7 @@ static void ReplaceVehicleWndProc(Window *w, WindowEvent *e) WP(w, replaceveh_d).update_right = true; WP(w, replaceveh_d).init_lists = true; } - SetWindowDirty(w); + w->SetDirty(); } break; } @@ -441,7 +441,7 @@ static void ReplaceVehicleWndProc(Window *w, WindowEvent *e) WP(w, replaceveh_d).update_left = true; WP(w, replaceveh_d).update_right = true; WP(w, replaceveh_d).init_lists = true; - SetWindowDirty(w); + w->SetDirty(); } break; case WE_RESIZE: @@ -472,7 +472,7 @@ static void ReplaceVehicleWndProc(Window *w, WindowEvent *e) case WE_INVALIDATE_DATA: if (_rebuild_left_list) WP(w, replaceveh_d).update_left = true; if (_rebuild_right_list) WP(w, replaceveh_d).update_right = true; - SetWindowDirty(w); + w->SetDirty(); break; case WE_DESTROY: |