summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2010-06-15 22:48:50 +0000
committersmatz <smatz@openttd.org>2010-06-15 22:48:50 +0000
commit4cae19175e79c5e446bfddbe377ad26821bfa1cf (patch)
tree66bb3a6d0795fffd0db6625dde57bdf69a625d1d /src
parenteee3b46607466cc1342574aad3ad5e075edf76b7 (diff)
downloadopenttd-4cae19175e79c5e446bfddbe377ad26821bfa1cf.tar.xz
(svn r19990) -Fix: owner of the Waypoint View window wasn't properly set
Diffstat (limited to 'src')
-rw-r--r--src/waypoint_gui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/waypoint_gui.cpp b/src/waypoint_gui.cpp
index 3e7b3d44b..430a1cf37 100644
--- a/src/waypoint_gui.cpp
+++ b/src/waypoint_gui.cpp
@@ -44,8 +44,6 @@ public:
this->wp = Waypoint::Get(window_number);
this->vt = (wp->string_id == STR_SV_STNAME_WAYPOINT) ? VEH_TRAIN : VEH_SHIP;
- if (this->wp->owner != OWNER_NONE) this->owner = this->wp->owner;
-
this->CreateNestedTree(desc);
if (this->vt == VEH_TRAIN) {
this->GetWidget<NWidgetCore>(WAYPVW_SHOW_VEHICLES)->SetDataTip(STR_TRAIN, STR_STATION_VIEW_SCHEDULED_TRAINS_TOOLTIP);
@@ -54,7 +52,9 @@ public:
}
this->FinishInitNested(desc, window_number);
+ if (this->wp->owner != OWNER_NONE) this->owner = this->wp->owner;
this->flags4 |= WF_DISABLE_VP_SCROLL;
+
NWidgetViewport *nvp = this->GetWidget<NWidgetViewport>(WAYPVW_VIEWPORT);
nvp->InitializeViewport(this, this->wp->xy, ZOOM_LVL_MIN);