X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f8e089e0c5d1b3d5ef2259972f23a66af6da0eaa..00f553943850592fda4607bf8a34d458cf6ab522:/src/mac/window.cpp diff --git a/src/mac/window.cpp b/src/mac/window.cpp index bfff87c13d..8fad9699bc 100644 --- a/src/mac/window.cpp +++ b/src/mac/window.cpp @@ -1278,7 +1278,16 @@ void wxWindowMac::ScrollWindow(int dx, int dy, const wxRect *rect) child->GetPosition( &x, &y ); int w,h; child->GetSize( &w, &h ); - child->SetSize( x+dx, y+dy, w, h ); + if (rect) + { + wxRect rc(x,y,w,h); + if (rect->Intersects(rc)) + child->SetSize( x+dx, y+dy, w, h ); + } + else + { + child->SetSize( x+dx, y+dy, w, h ); + } } Update() ;