diff options
author | rubidium <rubidium@openttd.org> | 2009-10-17 14:29:10 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-10-17 14:29:10 +0000 |
commit | d1d35b95b6e75a263b9395125af7d22faf02f462 (patch) | |
tree | daed0a809413d71060da91af4c67175989222a2e /src/misc_gui.cpp | |
parent | 22ddb90fdbc45087064816ddb0cf0e0a27786db1 (diff) | |
download | openttd-d1d35b95b6e75a263b9395125af7d22faf02f462.tar.xz |
(svn r17786) -Fix [FS#3265]: graphical glitches (matrices/scrollbars with wrong 'size') upon reiniting windows
Diffstat (limited to 'src/misc_gui.cpp')
-rw-r--r-- | src/misc_gui.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp index 0085e4283..3150e1cae 100644 --- a/src/misc_gui.cpp +++ b/src/misc_gui.cpp @@ -1857,7 +1857,7 @@ public: case SLD_LOAD_SCENARIO: case SLD_LOAD_HEIGHTMAP: - this->vscroll.UpdateCapacity(-1); + this->vscroll.SetCapacity(this->vscroll.GetCapacity() - 1); case SLD_SAVE_GAME: this->GenerateFileName(); break; case SLD_SAVE_SCENARIO: strecpy(this->edit_str_buf, "UNNAMED", &this->edit_str_buf[edit_str_size - 1]); break; @@ -1974,7 +1974,7 @@ public: break; case SLWW_DRIVES_DIRECTORIES_LIST: { // Click the listbox - int y = (pt.y - this->widget[widget].top - 1) / 10; + int y = (pt.y - this->widget[SLWW_DRIVES_DIRECTORIES_LIST].top - 1) / 10; if (y < 0 || (y += this->vscroll.GetPosition()) >= this->vscroll.GetCount()) return; @@ -2092,7 +2092,7 @@ public: this->widget[SLWW_SAVE_GAME].left += diff; } - this->vscroll.UpdateCapacity(delta.y / 10); + this->vscroll.SetCapacity((this->widget[SLWW_DRIVES_DIRECTORIES_LIST].bottom - this->widget[SLWW_DRIVES_DIRECTORIES_LIST].top + 1) / 10); } virtual void OnInvalidateData(int data) |