mirror of https://github.com/OpenTTD/OpenTTD
(svn r21021) -Add [FS#4171]: Center industry gui and waypoint gui after resize (partly by Krille).
parent
83094e5e58
commit
df7a32d364
|
@ -927,6 +927,8 @@ public:
|
||||||
if (this->viewport != NULL) {
|
if (this->viewport != NULL) {
|
||||||
NWidgetViewport *nvp = this->GetWidget<NWidgetViewport>(IVW_VIEWPORT);
|
NWidgetViewport *nvp = this->GetWidget<NWidgetViewport>(IVW_VIEWPORT);
|
||||||
nvp->UpdateViewportCoordinates(this);
|
nvp->UpdateViewportCoordinates(this);
|
||||||
|
|
||||||
|
ScrollWindowToTile(Industry::Get(this->window_number)->location.GetCenterTile(), this, true); // Re-center viewport.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -127,6 +127,8 @@ public:
|
||||||
NWidgetViewport *nvp = this->GetWidget<NWidgetViewport>(WAYPVW_VIEWPORT);
|
NWidgetViewport *nvp = this->GetWidget<NWidgetViewport>(WAYPVW_VIEWPORT);
|
||||||
nvp->UpdateViewportCoordinates(this);
|
nvp->UpdateViewportCoordinates(this);
|
||||||
this->wp->UpdateVirtCoord();
|
this->wp->UpdateVirtCoord();
|
||||||
|
|
||||||
|
ScrollWindowToTile(this->GetCenterTile(), this, true); // Re-center viewport.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue