summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2009-09-13 14:50:52 +0000
committerfrosch <frosch@openttd.org>2009-09-13 14:50:52 +0000
commit0c8c2085699ffd3238926f0e6ce763faf8943c0a (patch)
treed6be8d9ede28a095c08af65c50e31835a134416b /src
parentd0836f9ec81082ad8807eb5617ebbef343edcf88 (diff)
downloadopenttd-0c8c2085699ffd3238926f0e6ce763faf8943c0a.tar.xz
(svn r17522) -Fix: Scroll to selected content after sorting the list and after updating the scrollbar maximum.
Diffstat (limited to 'src')
-rw-r--r--src/network/network_content_gui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/network_content_gui.cpp b/src/network/network_content_gui.cpp
index 047d898f8..669f1b89a 100644
--- a/src/network/network_content_gui.cpp
+++ b/src/network/network_content_gui.cpp
@@ -251,8 +251,10 @@ class NetworkContentListWindow : public QueryStringBaseWindow, ContentCallback {
this->FilterContentList();
this->content.Compact();
this->content.RebuildDone();
+ this->SortContentList();
this->vscroll.SetCount(this->content.Length()); // Update the scrollbar
+ this->ScrollToSelected();
}
/** Sort content by name. */
@@ -315,7 +317,6 @@ class NetworkContentListWindow : public QueryStringBaseWindow, ContentCallback {
for (ConstContentIterator iter = this->content.Begin(); iter != this->content.End(); iter++) {
if (*iter == this->selected) {
this->list_pos = iter - this->content.Begin();
- this->ScrollToSelected();
return;
}
}
@@ -376,7 +377,6 @@ public:
if (this->content.NeedRebuild()) {
this->BuildContentList();
}
- this->SortContentList();
/* To sum all the bytes we intend to download */
uint filesize = 0;