position is relative : add to the top left point of the original rect

fixes bug #700


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17987 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval 2006-06-30 19:24:06 +00:00
parent 2c38311d40
commit deca617c6b

View File

@ -358,16 +358,13 @@ _TContainerViewFilter_::ObjectDropFilter(BMessage *msg, BHandler **_handler)
else
dragger = NULL;
if (dragger->fRelation == BDragger::TARGET_IS_CHILD) {
BRect rect = dragger->Frame();
rect.OffsetTo(point);
point = fShelf->AdjustReplicantBy(rect, msg);
} else {
BRect rect = dragger->fTarget->Frame();
rect.OffsetTo(point);
point = fShelf->AdjustReplicantBy(rect, msg);
}
BRect rect;
if (dragger->fRelation == BDragger::TARGET_IS_CHILD)
rect = dragger->Frame();
else
rect = dragger->fTarget->Frame();
rect.OffsetTo(point);
point = rect.LeftTop() + fShelf->AdjustReplicantBy(rect, msg);
if (dragger->fRelation == BDragger::TARGET_IS_PARENT)
dragger->fTarget->MoveTo(point);