Add a method to BView::Private that calls BView::_RemoveSelf().
Add a struct to kits/interface/Layout.cpp that uses BView::Private to provide RAII mechanics for the removal of views (calling BView::Private::RemoveSelf()). Use the new struct to simplify BLayout::AddItem().
This commit is contained in:
@@ -66,6 +66,11 @@ public:
|
||||
bool WillLayout();
|
||||
bool MinMaxValid();
|
||||
|
||||
bool RemoveSelf()
|
||||
{
|
||||
return fView->_RemoveSelf();
|
||||
}
|
||||
|
||||
BView* fView;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user