Scrollbars losed their target when detached. Once again, the problem showed up with BTabView

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15738 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini 2005-12-30 08:54:55 +00:00
parent 6fce24d777
commit 370aa51090

View File

@ -200,10 +200,14 @@ BScrollBar::BScrollBar(BMessage *data)
BScrollBar::~BScrollBar()
{
if (fTarget) {
if (fOrientation == B_VERTICAL)
fTarget->fVerScroller = NULL;
else
fTarget->fHorScroller = NULL;
}
delete fPrivateData;
free(fTargetName);
// TODO: detaching from target is currently done in DetachedFromWindow(),
// maybe it should be done here instead?
}
// Instantiate
@ -577,16 +581,6 @@ BScrollBar::MouseMoved(BPoint where, uint32 transit, const BMessage* message)
void
BScrollBar::DetachedFromWindow()
{
if (fTarget) {
if (fOrientation == B_VERTICAL)
fTarget->fVerScroller = NULL;
else
fTarget->fHorScroller = NULL;
}
fTarget = NULL;
free(fTargetName);
fTargetName = NULL;
}
// Draw