(svn r18126) -Codechange: remove duplicate (since r18119) scrollbar capacity/matrix initialisation

This commit is contained in:
rubidium
2009-11-16 20:34:57 +00:00
parent cb3c4f2ebe
commit 626de6b128
18 changed files with 4 additions and 75 deletions

View File

@@ -143,13 +143,11 @@ public:
this->SortBridgeList();
this->vscroll.SetCount(bl->Length());
this->vscroll.SetCapacity(this->GetWidget<NWidgetBase>(BBSW_BRIDGE_LIST)->current_y / this->resize.step_height);
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);
this->vscroll.SetCapacity(this->last_size);
}
this->GetWidget<NWidgetCore>(BBSW_BRIDGE_LIST)->widget_data = (this->vscroll.GetCapacity() << MAT_ROW_START) + (1 << MAT_COL_START);
}