diff options
| author | Rémi Verschelde | 2016-06-30 16:34:38 +0200 |
|---|---|---|
| committer | GitHub | 2016-06-30 16:34:38 +0200 |
| commit | 729e61e1d5faedeee116f3e3189c5453e206643e (patch) | |
| tree | b84ff1680a3fe43e8a03e64fecc32ddd9fe44232 | |
| parent | e8a2c767d2c151b7960cc8a977b09664e10824e1 (diff) | |
| parent | 050a514799148877ee56d6d678ad2ce45589aeb5 (diff) | |
| download | godot-729e61e1d5faedeee116f3e3189c5453e206643e.tar.gz godot-729e61e1d5faedeee116f3e3189c5453e206643e.tar.zst godot-729e61e1d5faedeee116f3e3189c5453e206643e.zip | |
Merge pull request #5502 from Paulb23/dock_connection_spam_issue_5498
Fixed signal connection prints when moving docks, issue 5498
| -rw-r--r-- | scene/gui/color_ramp_edit.cpp | 4 | ||||
| -rw-r--r-- | scene/gui/line_edit.cpp | 4 | ||||
| -rw-r--r-- | tools/editor/editor_dir_dialog.cpp | 10 | ||||
| -rw-r--r-- | tools/editor/plugins/shader_graph_editor_plugin.cpp | 4 |
4 files changed, 17 insertions, 5 deletions
diff --git a/scene/gui/color_ramp_edit.cpp b/scene/gui/color_ramp_edit.cpp index 50e1ffbec..b7347f00d 100644 --- a/scene/gui/color_ramp_edit.cpp +++ b/scene/gui/color_ramp_edit.cpp @@ -271,7 +271,9 @@ void ColorRampEdit::_input_event(const InputEvent& p_event) { void ColorRampEdit::_notification(int p_what) { if (p_what==NOTIFICATION_ENTER_TREE) { - picker->connect("color_changed",this,"_color_changed"); + if (!picker->is_connected("color_changed",this,"_color_changed")) { + picker->connect("color_changed",this,"_color_changed"); + } } if (p_what==NOTIFICATION_DRAW) { diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index 16000bb55..c025e4c70 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -556,7 +556,9 @@ void LineEdit::_notification(int p_what) { cursor_set_blink_enabled(EDITOR_DEF("text_editor/caret_blink", false)); cursor_set_blink_speed(EDITOR_DEF("text_editor/caret_blink_speed", 0.65)); - EditorSettings::get_singleton()->connect("settings_changed",this,"_editor_settings_changed"); + if (!EditorSettings::get_singleton()->is_connected("settings_changed",this,"_editor_settings_changed")) { + EditorSettings::get_singleton()->connect("settings_changed",this,"_editor_settings_changed"); + } } } break; #endif diff --git a/tools/editor/editor_dir_dialog.cpp b/tools/editor/editor_dir_dialog.cpp index a6e231cf1..8900cef7b 100644 --- a/tools/editor/editor_dir_dialog.cpp +++ b/tools/editor/editor_dir_dialog.cpp @@ -99,8 +99,14 @@ void EditorDirDialog::_notification(int p_what) { if (p_what==NOTIFICATION_ENTER_TREE) { reload(); - tree->connect("item_collapsed",this,"_item_collapsed",varray(),CONNECT_DEFERRED); - EditorFileSystem::get_singleton()->connect("filesystem_changed",this,"reload"); + + if (!tree->is_connected("item_collapsed",this,"_item_collapsed")) { + tree->connect("item_collapsed",this,"_item_collapsed",varray(),CONNECT_DEFERRED); + } + + if (!EditorFileSystem::get_singleton()->is_connected("filesystem_changed",this,"reload")) { + EditorFileSystem::get_singleton()->connect("filesystem_changed",this,"reload"); + } } diff --git a/tools/editor/plugins/shader_graph_editor_plugin.cpp b/tools/editor/plugins/shader_graph_editor_plugin.cpp index d567c8e9b..dea2fe483 100644 --- a/tools/editor/plugins/shader_graph_editor_plugin.cpp +++ b/tools/editor/plugins/shader_graph_editor_plugin.cpp @@ -176,7 +176,9 @@ void GraphColorRampEdit::_input_event(const InputEvent& p_event) { void GraphColorRampEdit::_notification(int p_what){ if (p_what==NOTIFICATION_ENTER_TREE) { - picker->connect("color_changed",this,"_color_changed"); + if (!picker->is_connected("color_changed",this,"_color_changed")) { + picker->connect("color_changed",this,"_color_changed"); + } } if (p_what==NOTIFICATION_DRAW) { |
