[Editor] Fix inspector keying signals argument count.
The second parameter of the signals `EditorInspector.property_keyed` and `EditorProperty.property_keyed_with_value` can be NIL, causing the event to fire with less arguments when using `emit_signal` that accepts Variant arguments, so we use the pointer version instead.
This commit is contained in:
parent
fcc2648e18
commit
98b147b319
4 changed files with 18 additions and 7 deletions
|
|
@ -2909,8 +2909,11 @@ void EditorPropertyResource::_resource_changed(const RES &p_resource) {
|
|||
}
|
||||
}
|
||||
|
||||
void EditorPropertyResource::_sub_inspector_property_keyed(const String &p_property, const Variant &p_value, bool) {
|
||||
emit_signal(SNAME("property_keyed_with_value"), String(get_edited_property()) + ":" + p_property, p_value, false);
|
||||
void EditorPropertyResource::_sub_inspector_property_keyed(const String &p_property, const Variant &p_value, bool p_advance) {
|
||||
// The second parameter could be null, causing the event to fire with less arguments, so use the pointer call which preserves it.
|
||||
const Variant args[3] = { String(get_edited_property()) + ":" + p_property, p_value, p_advance };
|
||||
const Variant *argp[3] = { &args[0], &args[1], &args[2] };
|
||||
emit_signal(SNAME("property_keyed_with_value"), argp, 3);
|
||||
}
|
||||
|
||||
void EditorPropertyResource::_sub_inspector_resource_selected(const RES &p_resource, const String &p_property) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue