summaryrefslogtreecommitdiff
path: root/src/bridge_gui.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2013-06-30 14:36:31 +0000
committerfrosch <frosch@openttd.org>2013-06-30 14:36:31 +0000
commit43ec0bf0c118b5228a9c50a2ba1650d021dc5c44 (patch)
tree5aef49476d90a8b682f809125c8c37d035a1c9fa /src/bridge_gui.cpp
parent8116aeff218fe55c98c0dcd2a62390fe7e7d9c6e (diff)
downloadopenttd-43ec0bf0c118b5228a9c50a2ba1650d021dc5c44.tar.xz
(svn r25537) -Codechange: Optionally make WWT_MATRIX compute the number of rows and columns from the resize step size.
Diffstat (limited to 'src/bridge_gui.cpp')
-rw-r--r--src/bridge_gui.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/bridge_gui.cpp b/src/bridge_gui.cpp
index e6f9ab4b7..234102931 100644
--- a/src/bridge_gui.cpp
+++ b/src/bridge_gui.cpp
@@ -159,7 +159,6 @@ public:
if (this->last_size > this->vscroll->GetCapacity()) {
ResizeWindow(this, 0, (this->last_size - this->vscroll->GetCapacity()) * this->resize.step_height);
}
- this->GetWidget<NWidgetCore>(WID_BBS_BRIDGE_LIST)->widget_data = (this->vscroll->GetCapacity() << MAT_ROW_START) + (1 << MAT_COL_START);
}
~BuildBridgeWindow()
@@ -297,7 +296,6 @@ public:
virtual void OnResize()
{
this->vscroll->SetCapacityFromWidget(this, WID_BBS_BRIDGE_LIST);
- this->GetWidget<NWidgetCore>(WID_BBS_BRIDGE_LIST)->widget_data = (this->vscroll->GetCapacity() << MAT_ROW_START) + (1 << MAT_COL_START);
this->last_size = max(this->vscroll->GetCapacity(), this->last_size);
}
@@ -340,7 +338,7 @@ static const NWidgetPart _nested_build_bridge_widgets[] = {
NWidget(WWT_DROPDOWN, COLOUR_DARK_GREEN, WID_BBS_DROPDOWN_CRITERIA), SetFill(1, 0), SetDataTip(0x0, STR_TOOLTIP_SORT_CRITERIA),
EndContainer(),
/* Matrix. */
- NWidget(WWT_MATRIX, COLOUR_DARK_GREEN, WID_BBS_BRIDGE_LIST), SetFill(1, 0), SetResize(0, 22), SetMatrixDataTip(1, 4, STR_SELECT_BRIDGE_SELECTION_TOOLTIP), SetScrollbar(WID_BBS_SCROLLBAR),
+ NWidget(WWT_MATRIX, COLOUR_DARK_GREEN, WID_BBS_BRIDGE_LIST), SetFill(1, 0), SetResize(0, 22), SetMatrixDataTip(1, 0, STR_SELECT_BRIDGE_SELECTION_TOOLTIP), SetScrollbar(WID_BBS_SCROLLBAR),
EndContainer(),
/* scrollbar + resize button */