summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Userland/Libraries/LibGUI/GMLAutocompleteProvider.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibGUI/GMLAutocompleteProvider.cpp b/Userland/Libraries/LibGUI/GMLAutocompleteProvider.cpp
index 77fe344238..43d9396249 100644
--- a/Userland/Libraries/LibGUI/GMLAutocompleteProvider.cpp
+++ b/Userland/Libraries/LibGUI/GMLAutocompleteProvider.cpp
@@ -105,6 +105,7 @@ void GMLAutocompleteProvider::provide_completions(Function<void(Vector<Entry>)>
}
auto& widget_class = *Core::ObjectClassRegistration::find("GUI::Widget");
+ auto& layout_class = *Core::ObjectClassRegistration::find("GUI::Layout");
Vector<GUI::AutocompleteProvider::Entry> class_entries, identifier_entries;
switch (state) {
@@ -190,10 +191,9 @@ void GMLAutocompleteProvider::provide_completions(Function<void(Vector<Entry>)>
break;
if (identifier_string == "layout") {
Core::ObjectClassRegistration::for_each([&](const Core::ObjectClassRegistration& registration) {
- if (!registration.is_derived_from(widget_class))
+ if (&registration == &layout_class || !registration.is_derived_from(layout_class))
return;
- if (registration.class_name().contains("Layout"))
- class_entries.empend(String::formatted("@{}", registration.class_name()), 0u);
+ class_entries.empend(String::formatted("@{}", registration.class_name()), 0u);
});
}
break;