(svn r25287) -Codechange: Keep a reference to the WindowDesc in the Window after construction.

This commit is contained in:
frosch
2013-05-26 19:23:42 +00:00
parent b10a4f151a
commit 56e4a8c4d6
61 changed files with 488 additions and 482 deletions

View File

@@ -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,