mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2026-07-26 00:45:35 +00:00
(svn r19258) [1.0] -Backport from trunk:
- Feature: [NewGRF] Add 2 bits of pseudo-random data for rail types, based on tile location (r19235) - Fix: Writing (console) output to a file failed on Windows if the date would not be logged [FS#3639] (r19252) - Fix: [NewGRF] Some GRF error messages did not free the previous error messages, creating a memory leak (r19251) - Fix: With RTL languages clicking a horizontal scrollbar that could not scroll could cause a crash [FS#3643] (r19250) - Fix: Start and end tiles were swapped in CMD_REMOVE_LONG_ROAD causing too much road to be removed [FS#3642] (r19249) - Fix: DOS 'port' did not compile anymore (r19248) - Fix: The -M command line option did not work (r19233)
This commit is contained in:
+1
-1
@@ -1757,7 +1757,7 @@ static bool HandleScrollbarScrolling()
|
||||
|
||||
/* Find the item we want to move to and make sure it's inside bounds. */
|
||||
int pos = min(max(0, i + _scrollbar_start_pos) * sb->GetCount() / _scrollbar_size, max(0, sb->GetCount() - sb->GetCapacity()));
|
||||
if (rtl) pos = sb->GetCount() - sb->GetCapacity() - pos;
|
||||
if (rtl) pos = max(0, sb->GetCount() - sb->GetCapacity() - pos);
|
||||
if (pos != sb->GetPosition()) {
|
||||
sb->SetPosition(pos);
|
||||
w->SetDirty();
|
||||
|
||||
Reference in New Issue
Block a user