hrev45203 adds 1 changeset to branch 'master' old head: 79fd9dac6ca77831d161aaa6c0b0976e1507f0f1 new head: fdb61e9836a604f056e74f47a739ffef3dc062eb overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=fdb61e9+%5E79fd9da ---------------------------------------------------------------------------- fdb61e9: Don't allow setting a scrollbar position to nan. Since nan != nan, the scrollbar would otherwise try to move the view to the new position, the view would try to set the scrollbar value again, and so on. [ Adrien Destugues <pulkomandy@xxxxxxxxx> ] ---------------------------------------------------------------------------- Revision: hrev45203 Commit: fdb61e9836a604f056e74f47a739ffef3dc062eb URL: http://cgit.haiku-os.org/haiku/commit/?id=fdb61e9 Author: Adrien Destugues <pulkomandy@xxxxxxxxx> Date: Fri Jan 25 21:17:59 2013 UTC ---------------------------------------------------------------------------- 1 file changed, 3 insertions(+), 1 deletion(-) src/kits/interface/ScrollBar.cpp | 4 +++- ---------------------------------------------------------------------------- diff --git a/src/kits/interface/ScrollBar.cpp b/src/kits/interface/ScrollBar.cpp index c12c5ab..9bb0899 100644 --- a/src/kits/interface/ScrollBar.cpp +++ b/src/kits/interface/ScrollBar.cpp @@ -379,6 +379,8 @@ BScrollBar::SetValue(float value) value = fMax; else if (value < fMin) value = fMin; + else if(isnan(value)) + return; value = roundf(value); @@ -408,7 +410,7 @@ BScrollBar::ValueChanged(float newValue) { TRACE("BScrollBar(%s)::ValueChanged(%.1f)\n", Name(), newValue); - if (fTarget) { + if (fTarget && newValue) { // cache target bounds BRect targetBounds = fTarget->Bounds(); // if vertical, check bounds top and scroll if different from newValue