diff options
author | frosch <frosch@openttd.org> | 2013-05-26 19:23:42 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2013-05-26 19:23:42 +0000 |
commit | 56e4a8c4d63b19cb037ac1ba64c5a4d7fde4350b (patch) | |
tree | f3e5c225182fce7a451af4e09e943920e0f1cc3c /src/timetable_gui.cpp | |
parent | b10a4f151aa534860dcc61ecf8cba7b3589e6281 (diff) | |
download | openttd-56e4a8c4d63b19cb037ac1ba64c5a4d7fde4350b.tar.xz |
(svn r25287) -Codechange: Keep a reference to the WindowDesc in the Window after construction.
Diffstat (limited to 'src/timetable_gui.cpp')
-rw-r--r-- | src/timetable_gui.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/timetable_gui.cpp b/src/timetable_gui.cpp index 7fc8da483..7bb8ca06c 100644 --- a/src/timetable_gui.cpp +++ b/src/timetable_gui.cpp @@ -164,16 +164,16 @@ struct TimetableWindow : Window { Scrollbar *vscroll; bool query_is_speed_query; ///< The currently open query window is a speed query and not a time query. - TimetableWindow(const WindowDesc *desc, WindowNumber window_number) : - Window(), + TimetableWindow(WindowDesc *desc, WindowNumber window_number) : + Window(desc), sel_index(-1), vehicle(Vehicle::Get(window_number)), show_expected(true) { - this->CreateNestedTree(desc); + this->CreateNestedTree(); this->vscroll = this->GetScrollbar(WID_VT_SCROLLBAR); this->UpdateSelectionStates(); - this->FinishInitNested(desc, window_number); + this->FinishInitNested(window_number); this->owner = this->vehicle->owner; } @@ -689,7 +689,7 @@ static const NWidgetPart _nested_timetable_widgets[] = { EndContainer(), }; -static const WindowDesc _timetable_desc( +static WindowDesc _timetable_desc( WDP_AUTO, 400, 130, WC_VEHICLE_TIMETABLE, WC_VEHICLE_VIEW, WDF_CONSTRUCTION, |