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:
@@ -135,7 +135,7 @@ AppGroupView::MouseDown(BPoint point)
|
|||||||
if (BRect(fCloseRect).InsetBySelf(-5, -5).Contains(point)) {
|
if (BRect(fCloseRect).InsetBySelf(-5, -5).Contains(point)) {
|
||||||
int32 children = fInfo.size();
|
int32 children = fInfo.size();
|
||||||
for (int32 i = 0; i < children; i++) {
|
for (int32 i = 0; i < children; i++) {
|
||||||
GetLayout()->RemoveView(fInfo[i]);
|
fInfo[i]->RemoveSelf();
|
||||||
delete fInfo[i];
|
delete fInfo[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -183,7 +183,7 @@ AppGroupView::MessageReceived(BMessage* msg)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
fInfo.erase(vIt);
|
fInfo.erase(vIt);
|
||||||
GetLayout()->RemoveView(view);
|
view->RemoveSelf();
|
||||||
delete view;
|
delete view;
|
||||||
|
|
||||||
fParent->PostMessage(msg);
|
fParent->PostMessage(msg);
|
||||||
@@ -216,7 +216,7 @@ AppGroupView::AddInfo(NotificationView* view)
|
|||||||
if (id == fInfo[i]->MessageID()) {
|
if (id == fInfo[i]->MessageID()) {
|
||||||
NotificationView* oldView = fInfo[i];
|
NotificationView* oldView = fInfo[i];
|
||||||
fParent->NotificationViewSwapped(oldView, view);
|
fParent->NotificationViewSwapped(oldView, view);
|
||||||
GetLayout()->RemoveView(oldView);
|
oldView->RemoveSelf();
|
||||||
delete oldView;
|
delete oldView;
|
||||||
|
|
||||||
fInfo[i] = view;
|
fInfo[i] = view;
|
||||||
|
|||||||
@@ -242,8 +242,8 @@ NotificationWindow::MessageReceived(BMessage* message)
|
|||||||
if (fAppViews.erase(view->Group()) < 1)
|
if (fAppViews.erase(view->Group()) < 1)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (GetLayout()->RemoveView(view))
|
view->RemoveSelf();
|
||||||
delete view;
|
delete view;
|
||||||
|
|
||||||
_ShowHide();
|
_ShowHide();
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user