From 050a514799148877ee56d6d678ad2ce45589aeb5 Mon Sep 17 00:00:00 2001 From: Paulb23 Date: Thu, 30 Jun 2016 15:12:14 +0100 Subject: Fixed signal connection prints when moving docks, issue 5498 --- tools/editor/editor_dir_dialog.cpp | 10 ++++++++-- tools/editor/plugins/shader_graph_editor_plugin.cpp | 4 +++- 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'tools') diff --git a/tools/editor/editor_dir_dialog.cpp b/tools/editor/editor_dir_dialog.cpp index a6e231cf18..8900cef7b9 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 d567c8e9b3..dea2fe4833 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) { -- cgit v1.2.3