diff options
author | frosch <frosch@openttd.org> | 2013-06-30 14:39:09 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2013-06-30 14:39:09 +0000 |
commit | c1bf3122ad2ae2fd4d8f2bf835fbf9ab21b8caf4 (patch) | |
tree | 9d78b98ebb80cf3529b382d837a6606aca731839 /src/bridge_gui.cpp | |
parent | f128c615951211457dd04bec4c3125f8259e2827 (diff) | |
download | openttd-c1bf3122ad2ae2fd4d8f2bf835fbf9ab21b8caf4.tar.xz |
(svn r25543) -Cleanup: Make the bridge and object picker not restore their previous size, but the previously saved size.
Diffstat (limited to 'src/bridge_gui.cpp')
-rw-r--r-- | src/bridge_gui.cpp | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/src/bridge_gui.cpp b/src/bridge_gui.cpp index 234102931..04a6e3760 100644 --- a/src/bridge_gui.cpp +++ b/src/bridge_gui.cpp @@ -76,7 +76,6 @@ void CcBuildBridge(const CommandCost &result, TileIndex end_tile, uint32 p1, uin class BuildBridgeWindow : public Window { private: /* Runtime saved values */ - static uint16 last_size; ///< Last size of the bridge GUI window. static Listing last_sorting; ///< Last setting of the sort. /* Constants for sorting the bridges */ @@ -153,12 +152,6 @@ public: this->SortBridgeList(); this->vscroll->SetCount(bl->Length()); - if (this->last_size < this->vscroll->GetCapacity()) this->last_size = this->vscroll->GetCapacity(); - if (this->last_size > this->vscroll->GetCount()) this->last_size = this->vscroll->GetCount(); - /* Resize the bridge selection window if we used a bigger one the last time. */ - if (this->last_size > this->vscroll->GetCapacity()) { - ResizeWindow(this, 0, (this->last_size - this->vscroll->GetCapacity()) * this->resize.step_height); - } } ~BuildBridgeWindow() @@ -296,13 +289,9 @@ public: virtual void OnResize() { this->vscroll->SetCapacityFromWidget(this, WID_BBS_BRIDGE_LIST); - - this->last_size = max(this->vscroll->GetCapacity(), this->last_size); } }; -/** Set the default size of the Build Bridge Window. */ -uint16 BuildBridgeWindow::last_size = 4; /** Set the default sorting for the bridges */ Listing BuildBridgeWindow::last_sorting = {true, 2}; |