summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
302129f)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44216
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// and scrolling direction
// 2. if scrolling in both axes, scroll all children
// and scrolling direction
// 2. if scrolling in both axes, scroll all children
+ bool shouldMove = false;
+
if ( rect && (dx * dy == 0 /* moving in only one of x, y axis */) )
{
wxRect childRect = child->GetRect();
if ( dx == 0 && (childRect.GetLeft() <= rect->GetRight() ||
childRect.GetRight() >= rect->GetLeft()) )
{
if ( rect && (dx * dy == 0 /* moving in only one of x, y axis */) )
{
wxRect childRect = child->GetRect();
if ( dx == 0 && (childRect.GetLeft() <= rect->GetRight() ||
childRect.GetRight() >= rect->GetLeft()) )
{
- child->Move(child->GetPosition() + offset);
}
else if ( dy == 0 && (childRect.GetTop() <= rect->GetBottom() ||
childRect.GetBottom() >= rect->GetTop()) )
{
}
else if ( dy == 0 && (childRect.GetTop() <= rect->GetBottom() ||
childRect.GetBottom() >= rect->GetTop()) )
{
- child->Move(child->GetPosition() + offset);
+ // else: child outside of scrolling shaft, don't move
+ else // scrolling in both axes or rect=NULL
- child->Move(child->GetPosition() + offset);
+
+ if ( shouldMove )
+ child->Move(child->GetPosition() + offset, wxSIZE_ALLOW_MINUS_ONE);
}
#endif // wxX11/!wxX11
}
}
#endif // wxX11/!wxX11
}