LibGUI: Check if a property is a GML Object in ScrollableContainerWidget
Previously we couldn't set the content widget from GML because it was looking for a GUI::Object, not a GML::Object.
This commit is contained in:
parent
f8aea2a7e5
commit
c6bcc0f96e
Notes:
sideshowbarker
2024-07-17 11:13:27 +09:00
Author: https://github.com/krkk Commit: https://github.com/SerenityOS/serenity/commit/c6bcc0f96e Pull-request: https://github.com/SerenityOS/serenity/pull/13942
1 changed files with 2 additions and 2 deletions
|
@ -96,7 +96,7 @@ bool ScrollableContainerWidget::load_from_gml_ast(NonnullRefPtr<GUI::GML::Node>
|
|||
});
|
||||
|
||||
auto content_widget_value = object->get_property("content_widget"sv);
|
||||
if (!content_widget_value.is_null() && !is<Object>(content_widget_value.ptr())) {
|
||||
if (!content_widget_value.is_null() && !is<GUI::GML::Object>(content_widget_value.ptr())) {
|
||||
dbgln("content widget is not an object");
|
||||
return false;
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ bool ScrollableContainerWidget::load_from_gml_ast(NonnullRefPtr<GUI::GML::Node>
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!content_widget_value.is_null() && is<Object>(content_widget_value.ptr())) {
|
||||
if (!content_widget_value.is_null() && is<GUI::GML::Object>(content_widget_value.ptr())) {
|
||||
auto content_widget = static_ptr_cast<GUI::GML::Object>(content_widget_value);
|
||||
auto class_name = content_widget->name();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue