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:
parent
6fce24d777
commit
370aa51090
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user