diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-09-19 08:40:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-19 08:40:49 +0200 |
commit | 58c8c05012a3d99fafc24384b00531c86962493b (patch) | |
tree | 6bb13eb0e8a02ce261f94b499d9a3712fba408c3 /editor/plugins | |
parent | f148e8eedeb1ff2dcf74d6843d1314d7c6db12a7 (diff) | |
parent | 37595e183df597257ae9d6213428eeee06810970 (diff) |
Merge pull request #22096 from elasota/fix-visual-shader-colors
Fix visual shader color constants not retaining edits
Diffstat (limited to 'editor/plugins')
-rw-r--r-- | editor/plugins/visual_shader_editor_plugin.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp index 0d683ea0a0..207078d90f 100644 --- a/editor/plugins/visual_shader_editor_plugin.cpp +++ b/editor/plugins/visual_shader_editor_plugin.cpp @@ -932,7 +932,10 @@ public: class VisualShaderNodePluginDefaultEditor : public VBoxContainer { GDCLASS(VisualShaderNodePluginDefaultEditor, VBoxContainer) public: - void _property_changed(const String &prop, const Variant &p_value) { + void _property_changed(const String &prop, const Variant &p_value, bool p_changing = false) { + + if (p_changing) + return; UndoRedo *undo_redo = EditorNode::get_singleton()->get_undo_redo(); @@ -979,7 +982,7 @@ public: } static void _bind_methods() { - ClassDB::bind_method("_property_changed", &VisualShaderNodePluginDefaultEditor::_property_changed); + ClassDB::bind_method("_property_changed", &VisualShaderNodePluginDefaultEditor::_property_changed, DEFVAL(false)); ClassDB::bind_method("_node_changed", &VisualShaderNodePluginDefaultEditor::_node_changed); ClassDB::bind_method("_refresh_request", &VisualShaderNodePluginDefaultEditor::_refresh_request); } |