AppendToPicture() now sets the correct picture to be returned from

EndPicture() (tests have confirmed this). Although appending to a 
picture doens't work yet for some reason...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21923 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini 2007-08-13 13:09:59 +00:00
parent ea6280b6d5
commit 277571370c
2 changed files with 7 additions and 6 deletions

View File

@ -488,13 +488,13 @@ BPicture::usurp(BPicture *lameDuck)
link.StartMessage(AS_DELETE_PICTURE);
link.Attach<int32>(token);
link.Flush();
delete extent;
// Reinitializes the BPicture
init_data();
}
delete extent;
// Reinitializes the BPicture
init_data();
// Do the usurping
usurped = lameDuck;
}

View File

@ -3114,8 +3114,9 @@ BView::AppendToPicture(BPicture *picture)
if (token == -1) {
BeginPicture(picture);
} else {
picture->usurped = cpicture;
picture->set_token(-1);
picture->usurp(cpicture);
cpicture = picture;
fOwner->fLink->StartMessage(AS_LAYER_APPEND_TO_PICTURE);
fOwner->fLink->Attach<int32>(token);
}