Skip to content

Commit

Permalink
GH-638 Guard against reconnection on node duplication
Browse files Browse the repository at this point in the history
  • Loading branch information
Naros committed Aug 1, 2024
1 parent fc196dd commit d8e90c9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/script/nodes/input/input_action.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "input_action.h"

#include "common/dictionary_utils.h"
#include "common/macros.h"
#include "common/property_utils.h"
#include "common/string_utils.h"

Expand Down Expand Up @@ -169,7 +170,7 @@ void OScriptNodeInputAction::post_initialize()
if (_is_in_editor())
{
ProjectSettings* settings = ProjectSettings::get_singleton();
settings->connect("settings_changed", callable_mp(this, &OScriptNodeInputAction::_settings_changed));
OCONNECT(settings, "settings_changed", callable_mp(this, &OScriptNodeInputAction::_settings_changed));
}

super::post_initialize();
Expand All @@ -180,7 +181,7 @@ void OScriptNodeInputAction::post_placed_new_node()
if (_is_in_editor())
{
ProjectSettings* settings = ProjectSettings::get_singleton();
settings->connect("settings_changed", callable_mp(this, &OScriptNodeInputAction::_settings_changed));
OCONNECT(settings, "settings_changed", callable_mp(this, &OScriptNodeInputAction::_settings_changed));
}

super::post_placed_new_node();
Expand Down

0 comments on commit d8e90c9

Please sign in to comment.