diff options
author | frosch <frosch@openttd.org> | 2010-08-12 06:44:45 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2010-08-12 06:44:45 +0000 |
commit | 10339c60c0e53ccc90f0cc379763be6582d87bf2 (patch) | |
tree | 475be37fecf0ade3656700f0a7024a10bda48545 /src/window.cpp | |
parent | 629b350a71c10b7675a70226d0ead657258f5cb6 (diff) | |
download | openttd-10339c60c0e53ccc90f0cc379763be6582d87bf2.tar.xz |
(svn r20452) -Codechange: Remove NWidgetCore::FindScrollbar() and associate scrollbar explicitly using a NWidgetPart via SetScrollbar().
Diffstat (limited to 'src/window.cpp')
-rw-r--r-- | src/window.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/window.cpp b/src/window.cpp index a002de09b..c20bc49f4 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -502,7 +502,7 @@ static void DispatchMouseWheelEvent(Window *w, const NWidgetCore *nwid, int whee } /* Scroll the widget attached to the scrollbar. */ - Scrollbar *sb = nwid->FindScrollbar(w); + Scrollbar *sb = (nwid->scrollbar_index >= 0 ? w->GetScrollbar(nwid->scrollbar_index) : NULL); if (sb != NULL && sb->GetCount() > sb->GetCapacity()) { sb->UpdatePosition(wheel); w->SetDirty(); |