notification_server: Don't remove the views from the layout.

Removing the view from the window and deleting it is fine. This is a
quick fix for #11976. The underlaying issue of how BLayout::RemoveView
should work still needs to be fixed.
This commit is contained in:
Michael Lotz 2015-04-16 21:34:26 +02:00
parent c7ad68f08c
commit 56a63697ae
2 changed files with 5 additions and 5 deletions

View File

@ -135,7 +135,7 @@ AppGroupView::MouseDown(BPoint point)
if (BRect(fCloseRect).InsetBySelf(-5, -5).Contains(point)) {
int32 children = fInfo.size();
for (int32 i = 0; i < children; i++) {
GetLayout()->RemoveView(fInfo[i]);
fInfo[i]->RemoveSelf();
delete fInfo[i];
}
@ -183,7 +183,7 @@ AppGroupView::MessageReceived(BMessage* msg)
break;
fInfo.erase(vIt);
GetLayout()->RemoveView(view);
view->RemoveSelf();
delete view;
fParent->PostMessage(msg);
@ -216,7 +216,7 @@ AppGroupView::AddInfo(NotificationView* view)
if (id == fInfo[i]->MessageID()) {
NotificationView* oldView = fInfo[i];
fParent->NotificationViewSwapped(oldView, view);
GetLayout()->RemoveView(oldView);
oldView->RemoveSelf();
delete oldView;
fInfo[i] = view;

View File

@ -242,8 +242,8 @@ NotificationWindow::MessageReceived(BMessage* message)
if (fAppViews.erase(view->Group()) < 1)
break;
if (GetLayout()->RemoveView(view))
delete view;
view->RemoveSelf();
delete view;
_ShowHide();
break;