LibGUI: Use Object::remove_all_children() in BreadcrumbBar (#4580)

This commit is contained in:
dantje 2020-12-27 23:07:10 +01:00 committed by GitHub
parent d1891f67ac
commit d1366b660e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
Notes: sideshowbarker 2024-07-19 00:31:56 +09:00

View file

@ -57,11 +57,7 @@ BreadcrumbBar::~BreadcrumbBar()
void BreadcrumbBar::clear_segments()
{
m_segments.clear();
// FIXME: Should Core::Object have something like "remove_all_children()" perhaps?
auto children = this->children();
for (auto& child : children)
child.remove_from_parent();
remove_all_children();
}
void BreadcrumbBar::append_segment(const String& text, const Gfx::Bitmap* icon, const String& data)