From f78937a394ac9727fcbce480fc6d0a97f67d32e2 Mon Sep 17 00:00:00 2001 From: kobewi Date: Sun, 3 Jan 2021 18:12:00 +0100 Subject: [PATCH] Don't emit changed signal on Color Picker close (cherry picked from commit a22b2f86e70d37356fda7966e50cecf279f7d310) --- editor/editor_properties.cpp | 7 ------- editor/editor_properties.h | 1 - 2 files changed, 8 deletions(-) diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp index 27be076516f..be34ddd1fe8 100644 --- a/editor/editor_properties.cpp +++ b/editor/editor_properties.cpp @@ -1917,11 +1917,6 @@ void EditorPropertyColor::_color_changed(const Color &p_color) { emit_changed(get_edited_property(), p_color, "", true); } -void EditorPropertyColor::_popup_closed() { - - emit_changed(get_edited_property(), picker->get_pick_color(), "", false); -} - void EditorPropertyColor::_picker_created() { // get default color picker mode from editor settings int default_color_mode = EDITOR_GET("interface/inspector/default_color_picker_mode"); @@ -1934,7 +1929,6 @@ void EditorPropertyColor::_picker_created() { void EditorPropertyColor::_bind_methods() { ClassDB::bind_method(D_METHOD("_color_changed"), &EditorPropertyColor::_color_changed); - ClassDB::bind_method(D_METHOD("_popup_closed"), &EditorPropertyColor::_popup_closed); ClassDB::bind_method(D_METHOD("_picker_created"), &EditorPropertyColor::_picker_created); } @@ -1970,7 +1964,6 @@ EditorPropertyColor::EditorPropertyColor() { add_child(picker); picker->set_flat(true); picker->connect("color_changed", this, "_color_changed"); - picker->connect("popup_closed", this, "_popup_closed"); picker->connect("picker_created", this, "_picker_created"); } diff --git a/editor/editor_properties.h b/editor/editor_properties.h index 1853a6b6e1e..7d59b8947f3 100644 --- a/editor/editor_properties.h +++ b/editor/editor_properties.h @@ -493,7 +493,6 @@ class EditorPropertyColor : public EditorProperty { GDCLASS(EditorPropertyColor, EditorProperty); ColorPickerButton *picker; void _color_changed(const Color &p_color); - void _popup_closed(); void _picker_created(); protected: