mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 18:02:05 -05:00
LibGUI: Actually try something in TabWidget::try_add_widget(Widget&)
This function, while returning an `ErrorOr<void>`, didn't call failable API.
This commit is contained in:
parent
43ff500a80
commit
664117564a
1 changed files with 2 additions and 2 deletions
|
@ -53,8 +53,8 @@ TabWidget::TabWidget()
|
|||
|
||||
ErrorOr<void> TabWidget::try_add_widget(Widget& widget)
|
||||
{
|
||||
m_tabs.append({ widget.title(), nullptr, &widget, false });
|
||||
add_child(widget);
|
||||
TRY(m_tabs.try_append({ widget.title(), nullptr, &widget, false }));
|
||||
TRY(try_add_child(widget));
|
||||
update_focus_policy();
|
||||
if (on_tab_count_change)
|
||||
on_tab_count_change(m_tabs.size());
|
||||
|
|
Loading…
Add table
Reference in a new issue