mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:17:36 +00:00
LibCore: Add Object::remove_all_children()
This commit is contained in:
parent
ddaedbca87
commit
e955c024b2
3 changed files with 8 additions and 4 deletions
|
@ -46,10 +46,7 @@ int main(int argc, char** argv)
|
|||
editor.set_automatic_indentation_enabled(true);
|
||||
|
||||
editor.on_change = [&] {
|
||||
// FIXME: This is not a very expressive way to remove all children..
|
||||
while (!preview.children().is_empty())
|
||||
preview.children().first().remove_from_parent();
|
||||
|
||||
preview.remove_all_children();
|
||||
preview.load_from_gml(editor.text());
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue