mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-09-09 00:13:20 +02:00
Object: Fix registration of inherited interface properties
We need to add inherited interface properties in the Properties hash, so we remove the DeclaredOnly flag when looking for interface properties in the type. We also need to use the type itself as the hash key, and not the adapter type.
This commit is contained in:
parent
1215ebc770
commit
91dda7f5be
@ -422,16 +422,15 @@ namespace GLib {
|
||||
if (attrs.Length == 0)
|
||||
continue;
|
||||
PropertyAttribute property_attr = attrs [0];
|
||||
PropertyInfo declared_prop = t.GetProperty (p.Name, BindingFlags.DeclaredOnly | BindingFlags.Public | BindingFlags.Instance);
|
||||
PropertyInfo declared_prop = t.GetProperty (p.Name, BindingFlags.Public | BindingFlags.Instance);
|
||||
if (declared_prop == null)
|
||||
continue;
|
||||
IntPtr param_spec = FindInterfaceProperty (adapter.GType, property_attr.Name);
|
||||
|
||||
Type type = (Type)adapter.GType;
|
||||
Dictionary<IntPtr, PropertyInfo> props;
|
||||
if (!Properties.TryGetValue (type, out props)) {
|
||||
if (!Properties.TryGetValue (t, out props)) {
|
||||
props = new Dictionary<IntPtr, PropertyInfo> ();
|
||||
Properties [type] = props;
|
||||
Properties [t] = props;
|
||||
}
|
||||
props [param_spec] = declared_prop;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user