diff options
| author | David Snopek <dsnopek@gmail.com> | 2024-05-17 11:56:09 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-17 11:56:09 -0500 |
| commit | b697ba8896e5fd0966274f00798c55a5bfed4e74 (patch) | |
| tree | 28ace19d68cbe8128babb9fd90007d0ae49ed677 /include | |
| parent | e4a4d76cb31b3f7f91720ad61ffbd383f9793c4a (diff) | |
| parent | 06373ce1cf737a33d6a7b2b14cfe25ed729b9c48 (diff) | |
| download | redot-cpp-b697ba8896e5fd0966274f00798c55a5bfed4e74.tar.gz | |
Merge pull request #1447 from dsnopek/avoid-double-postinitialize
Fix NOTIFICATION_POSTINITIALIZE sent twice to native parent classes
Diffstat (limited to 'include')
| -rw-r--r-- | include/godot_cpp/classes/wrapped.hpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/godot_cpp/classes/wrapped.hpp b/include/godot_cpp/classes/wrapped.hpp index 5d587a3..8702fb1 100644 --- a/include/godot_cpp/classes/wrapped.hpp +++ b/include/godot_cpp/classes/wrapped.hpp @@ -89,6 +89,7 @@ protected: ::godot::List<::godot::PropertyInfo> plist_owned; void _postinitialize(); + virtual void _notificationv(int32_t p_what, bool p_reversed = false) {} Wrapped(const StringName p_godot_class); Wrapped(GodotObject *p_godot_object); @@ -374,6 +375,11 @@ public: _gde_binding_reference_callback, \ }; \ \ +protected: \ + virtual void _notificationv(int32_t p_what, bool p_reversed = false) override { \ + m_class::notification_bind(this, p_what, p_reversed); \ + } \ + \ private: // Don't use this for your classes, use GDCLASS() instead. |
