mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 20:12:43 +00:00 
			
		
		
		
	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
					
				
					 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
		Add a link
		
	
		Reference in a new issue
	
	 Karol Kosek
						Karol Kosek