diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_translation_parser.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/visual_shader_editor_plugin.cpp | 16 | ||||
-rw-r--r-- | editor/pot_generator.cpp | 2 | ||||
-rw-r--r-- | editor/scene_tree_editor.cpp | 2 | ||||
-rw-r--r-- | editor/scene_tree_editor.h | 2 |
5 files changed, 18 insertions, 6 deletions
diff --git a/editor/editor_translation_parser.cpp b/editor/editor_translation_parser.cpp index fd36372dde..49d5cf1fd3 100644 --- a/editor/editor_translation_parser.cpp +++ b/editor/editor_translation_parser.cpp @@ -105,7 +105,7 @@ void EditorTranslationParser::get_recognized_extensions(List<String> *r_extensio for (int i = 0; i < temp.size(); i++) { extensions.insert(temp[i]); } - for (auto E = extensions.front(); E; E = E->next()) { + for (Set<String>::Element *E = extensions.front(); E; E = E->next()) { r_extensions->push_back(E->get()); } } diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp index dea85e8799..acc77bd098 100644 --- a/editor/plugins/visual_shader_editor_plugin.cpp +++ b/editor/plugins/visual_shader_editor_plugin.cpp @@ -353,6 +353,11 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id) { bool is_expression = !expression_node.is_null(); String expression = ""; + VisualShaderNodeCustom *custom_node = Object::cast_to<VisualShaderNodeCustom>(vsnode.ptr()); + if (custom_node) { + custom_node->_set_initialized(true); + } + GraphNode *node = memnew(GraphNode); register_link(p_type, p_id, vsnode.ptr(), node); @@ -1782,8 +1787,15 @@ void VisualShaderEditor::_port_edited() { ERR_FAIL_COND(!vsn.is_valid()); undo_redo->create_action(TTR("Set Input Default Port")); - undo_redo->add_do_method(vsn.ptr(), "set_input_port_default_value", editing_port, value); - undo_redo->add_undo_method(vsn.ptr(), "set_input_port_default_value", editing_port, vsn->get_input_port_default_value(editing_port)); + + Ref<VisualShaderNodeCustom> custom = Object::cast_to<VisualShaderNodeCustom>(vsn.ptr()); + if (custom.is_valid()) { + undo_redo->add_do_method(custom.ptr(), "_set_input_port_default_value", editing_port, value); + undo_redo->add_undo_method(custom.ptr(), "_set_input_port_default_value", editing_port, vsn->get_input_port_default_value(editing_port)); + } else { + undo_redo->add_do_method(vsn.ptr(), "set_input_port_default_value", editing_port, value); + undo_redo->add_undo_method(vsn.ptr(), "set_input_port_default_value", editing_port, vsn->get_input_port_default_value(editing_port)); + } undo_redo->add_do_method(graph_plugin.ptr(), "set_input_port_default_value", type, editing_node, editing_port, value); undo_redo->add_undo_method(graph_plugin.ptr(), "set_input_port_default_value", type, editing_node, editing_port, vsn->get_input_port_default_value(editing_port)); undo_redo->commit_action(); diff --git a/editor/pot_generator.cpp b/editor/pot_generator.cpp index 497cc0cbdc..b58b7e4cac 100644 --- a/editor/pot_generator.cpp +++ b/editor/pot_generator.cpp @@ -39,7 +39,7 @@ POTGenerator *POTGenerator::singleton = nullptr; #ifdef DEBUG_POT void POTGenerator::_print_all_translation_strings() { - for (auto E = all_translation_strings.front(); E; E = E.next()) { + for (OrderedHashMap<String, Vector<POTGenerator::MsgidData>>::Element E = all_translation_strings.front(); E; E = E.next()) { Vector<MsgidData> v_md = all_translation_strings[E.key()]; for (int i = 0; i < v_md.size(); i++) { print_line("++++++"); diff --git a/editor/scene_tree_editor.cpp b/editor/scene_tree_editor.cpp index ec37fa53b3..b4f7eda391 100644 --- a/editor/scene_tree_editor.cpp +++ b/editor/scene_tree_editor.cpp @@ -277,7 +277,7 @@ bool SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent, bool p_scroll } Ref<Texture2D> icon_temp; - auto signal_temp = BUTTON_SIGNALS; + SceneTreeEditorButton signal_temp = BUTTON_SIGNALS; if (num_connections >= 1 && num_groups >= 1) { icon_temp = get_theme_icon("SignalsAndGroups", "EditorIcons"); } else if (num_connections >= 1) { diff --git a/editor/scene_tree_editor.h b/editor/scene_tree_editor.h index fd5157f04f..b4c27b7c1f 100644 --- a/editor/scene_tree_editor.h +++ b/editor/scene_tree_editor.h @@ -43,7 +43,7 @@ class SceneTreeEditor : public Control { EditorSelection *editor_selection; - enum { + enum SceneTreeEditorButton { BUTTON_SUBSCENE = 0, BUTTON_VISIBILITY = 1, BUTTON_SCRIPT = 2, |