(svn r25287) -Codechange: Keep a reference to the WindowDesc in the Window after construction.
This commit is contained in:
@@ -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,
|
||||
|
Reference in New Issue
Block a user