diff options
Diffstat (limited to 'scene')
-rw-r--r-- | scene/gui/base_button.cpp | 2 | ||||
-rw-r--r-- | scene/gui/graph_edit.cpp | 1 | ||||
-rw-r--r-- | scene/gui/text_edit.h | 8 | ||||
-rw-r--r-- | scene/main/viewport.cpp | 2 | ||||
-rw-r--r-- | scene/resources/visual_shader.cpp | 2 | ||||
-rw-r--r-- | scene/resources/visual_shader_nodes.cpp | 8 |
6 files changed, 12 insertions, 11 deletions
diff --git a/scene/gui/base_button.cpp b/scene/gui/base_button.cpp index 211082d610..2e77d20d4e 100644 --- a/scene/gui/base_button.cpp +++ b/scene/gui/base_button.cpp @@ -345,7 +345,7 @@ String BaseButton::get_tooltip(const Point2 &p_pos) const { String tooltip = Control::get_tooltip(p_pos); if (shortcut_in_tooltip && shortcut.is_valid() && shortcut->is_valid()) { String text = shortcut->get_name() + " (" + shortcut->get_as_text() + ")"; - if (shortcut->get_name().nocasecmp_to(tooltip) != 0) { + if (tooltip != String() && shortcut->get_name().nocasecmp_to(tooltip) != 0) { text += "\n" + tooltip; } tooltip = text; diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp index 11b4c9e857..467d252c81 100644 --- a/scene/gui/graph_edit.cpp +++ b/scene/gui/graph_edit.cpp @@ -262,6 +262,7 @@ void GraphEdit::remove_child_notify(Node *p_child) { if (gn) { gn->disconnect("offset_changed", callable_mp(this, &GraphEdit::_graph_node_moved)); gn->disconnect("raise_request", callable_mp(this, &GraphEdit::_graph_node_raised)); + gn->disconnect("item_rect_changed", callable_mp((CanvasItem *)connections_layer, &CanvasItem::update)); } } diff --git a/scene/gui/text_edit.h b/scene/gui/text_edit.h index 17534cbbc8..562f4768ae 100644 --- a/scene/gui/text_edit.h +++ b/scene/gui/text_edit.h @@ -79,10 +79,10 @@ private: struct Line { Vector<Gutter> gutters; - int width_cache : 24; - bool marked : 1; - bool hidden : 1; - int wrap_amount_cache : 24; + int32_t width_cache; + bool marked; + bool hidden; + int32_t wrap_amount_cache; String data; Line() { width_cache = 0; diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index d962171555..b29b40ea5f 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -1509,7 +1509,7 @@ void Viewport::_gui_show_tooltip() { } Control *which = nullptr; - String tooltip = _gui_get_tooltip(gui.tooltip, gui.tooltip->get_global_transform().xform_inv(gui.tooltip_pos), &which); + String tooltip = _gui_get_tooltip(gui.tooltip, gui.tooltip->get_global_transform().xform_inv(gui.last_mouse_pos), &which); tooltip = tooltip.strip_edges(); if (tooltip.length() == 0) { return; // bye diff --git a/scene/resources/visual_shader.cpp b/scene/resources/visual_shader.cpp index 0c0b11db11..803ab265d4 100644 --- a/scene/resources/visual_shader.cpp +++ b/scene/resources/visual_shader.cpp @@ -1509,11 +1509,11 @@ void VisualShader::_update_shader() const { if (shader_mode != Shader::MODE_PARTICLES) { func_code += "\nvoid " + String(func_name[i]) + "() {\n"; } + insertion_pos.insert(i, code.get_string_length() + func_code.get_string_length()); Set<int> processed; Error err = _write_node(Type(i), global_code, global_code_per_node, global_code_per_func, func_code, default_tex_params, input_connections, output_connections, NODE_ID_OUTPUT, processed, false, classes); ERR_FAIL_COND(err != OK); - insertion_pos.insert(i, code.get_string_length()); if (shader_mode == Shader::MODE_PARTICLES) { code_map.insert(i, func_code); diff --git a/scene/resources/visual_shader_nodes.cpp b/scene/resources/visual_shader_nodes.cpp index dfc915c5b4..0e10682daf 100644 --- a/scene/resources/visual_shader_nodes.cpp +++ b/scene/resources/visual_shader_nodes.cpp @@ -4359,13 +4359,13 @@ String VisualShaderNodeTextureUniformTriplanar::generate_code(Shader::Mode p_mod String code = "\t{\n"; if (p_input_vars[0] == String() && p_input_vars[1] == String()) { - code += "\t\tvec4 n_tex_read = triplanar_texture( " + id + ", triplanar_power_normal, triplanar_pos );\n"; + code += "\t\tvec4 n_tex_read = triplanar_texture(" + id + ", triplanar_power_normal, triplanar_pos);\n"; } else if (p_input_vars[0] != String() && p_input_vars[1] == String()) { - code += "\t\tvec4 n_tex_read = triplanar_texture( " + id + ", " + p_input_vars[0] + ", triplanar_pos );\n"; + code += "\t\tvec4 n_tex_read = triplanar_texture(" + id + ", " + p_input_vars[0] + ", triplanar_pos);\n"; } else if (p_input_vars[0] == String() && p_input_vars[1] != String()) { - code += "\t\tvec4 n_tex_read = triplanar_texture( " + id + ", triplanar_power_normal," + p_input_vars[1] + " );\n"; + code += "\t\tvec4 n_tex_read = triplanar_texture(" + id + ", triplanar_power_normal, " + p_input_vars[1] + ");\n"; } else { - code += "\t\tvec4 n_tex_read = triplanar_texture( " + id + ", " + p_input_vars[0] + ", " + p_input_vars[1] + " );\n"; + code += "\t\tvec4 n_tex_read = triplanar_texture(" + id + ", " + p_input_vars[0] + ", " + p_input_vars[1] + ");\n"; } code += "\t\t" + p_output_vars[0] + " = n_tex_read.rgb;\n"; |