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 --- scene/gui/color_ramp_edit.cpp | 4 +++- scene/gui/line_edit.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'scene/gui') diff --git a/scene/gui/color_ramp_edit.cpp b/scene/gui/color_ramp_edit.cpp index 50e1ffbec9..b7347f00dc 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 16000bb55f..c025e4c706 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 -- cgit v1.2.3