diff options
author | alberth <alberth@openttd.org> | 2009-07-21 22:25:21 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2009-07-21 22:25:21 +0000 |
commit | 8083d67780d6a85c558080ec99dd2d24ae755d0f (patch) | |
tree | b1639f095175d1ff0444f5ae8197ded9e79000f7 /src/rail_gui.cpp | |
parent | 639a829f87d6c3363e0930987a0953c9851ac636 (diff) | |
download | openttd-8083d67780d6a85c558080ec99dd2d24ae755d0f.tar.xz |
(svn r16906) -Fix (r12939): Child windows of build toolbars were placed inconsistently.
Diffstat (limited to 'src/rail_gui.cpp')
-rw-r--r-- | src/rail_gui.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp index 82fc959ca..bcb21d63d 100644 --- a/src/rail_gui.cpp +++ b/src/rail_gui.cpp @@ -766,11 +766,11 @@ struct BuildRailToolbarWindow : Window { this->DisableWidget(RTW_REMOVE); this->InvalidateWidget(RTW_REMOVE); - DeleteWindowById(WC_BUILD_SIGNAL, 0); - DeleteWindowById(WC_BUILD_STATION, 0); - DeleteWindowById(WC_BUILD_DEPOT, 0); + DeleteWindowById(WC_BUILD_SIGNAL, TRANSPORT_RAIL); + DeleteWindowById(WC_BUILD_STATION, TRANSPORT_RAIL); + DeleteWindowById(WC_BUILD_DEPOT, TRANSPORT_RAIL); DeleteWindowById(WC_SELECT_STATION, 0); - DeleteWindowById(WC_BUILD_BRIDGE, 0); + DeleteWindowByClass(WC_BUILD_BRIDGE); } virtual void OnPlacePresize(Point pt, TileIndex tile) @@ -986,7 +986,7 @@ public: BuildRailStationWindow(const WindowDesc *desc, Window *parent, bool newstation) : PickerWindowBase(parent) { this->line_height = FONT_HEIGHT_NORMAL + 4; - this->InitNested(desc); + this->InitNested(desc, TRANSPORT_RAIL); this->LowerWidget(_railstation.orientation + BRSW_PLATFORM_DIR_X); if (_settings_client.gui.station_dragdrop) { @@ -1470,7 +1470,7 @@ private: } public: - BuildSignalWindow(const WindowDesc *desc, Window *parent) : PickerWindowBase(desc, parent) + BuildSignalWindow(const WindowDesc *desc, Window *parent) : PickerWindowBase(desc, parent, TRANSPORT_RAIL) { this->FindWindowPlacementAndResize(desc); }; @@ -1639,7 +1639,7 @@ enum BuildRailDepotWidgets { }; struct BuildRailDepotWindow : public PickerWindowBase { - BuildRailDepotWindow(const WindowDesc *desc, Window *parent) : PickerWindowBase(desc, parent) + BuildRailDepotWindow(const WindowDesc *desc, Window *parent) : PickerWindowBase(desc, parent, TRANSPORT_RAIL) { this->LowerWidget(_build_depot_direction + BRDW_DEPOT_NE); this->FindWindowPlacementAndResize(desc); @@ -1740,7 +1740,7 @@ enum BuildRailWaypointWidgets { }; struct BuildRailWaypointWindow : PickerWindowBase { - BuildRailWaypointWindow(const WindowDesc *desc, Window *parent) : PickerWindowBase(desc, parent) + BuildRailWaypointWindow(const WindowDesc *desc, Window *parent) : PickerWindowBase(desc, parent, TRANSPORT_RAIL) { this->hscroll.cap = 5; this->hscroll.count = _waypoint_count; |