diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_inspector.h | 2 | ||||
-rw-r--r-- | editor/editor_node.cpp | 1 | ||||
-rw-r--r-- | editor/editor_plugin.cpp | 6 | ||||
-rw-r--r-- | editor/editor_plugin.h | 4 | ||||
-rw-r--r-- | editor/editor_settings.cpp | 4 | ||||
-rw-r--r-- | editor/plugins/sprite_frames_editor_plugin.cpp | 6 | ||||
-rw-r--r-- | editor/renames_map_3_to_4.cpp | 4 |
7 files changed, 16 insertions, 11 deletions
diff --git a/editor/editor_inspector.h b/editor/editor_inspector.h index 4ffba18181..01231108d8 100644 --- a/editor/editor_inspector.h +++ b/editor/editor_inspector.h @@ -225,7 +225,7 @@ public: protected: static void _bind_methods(); - GDVIRTUAL1RC(bool, _can_handle, Variant) + GDVIRTUAL1RC(bool, _can_handle, Object *) GDVIRTUAL1(_parse_begin, Object *) GDVIRTUAL2(_parse_category, Object *, String) GDVIRTUAL2(_parse_group, Object *, String) diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index a0e876315c..b854da8e4f 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -8116,6 +8116,7 @@ void EditorPluginList::forward_3d_force_draw_over_viewport(Control *p_overlay) { } void EditorPluginList::add_plugin(EditorPlugin *p_plugin) { + ERR_FAIL_COND(plugins_list.has(p_plugin)); plugins_list.push_back(p_plugin); } diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp index 14cdbc364e..7b01ae69bf 100644 --- a/editor/editor_plugin.cpp +++ b/editor/editor_plugin.cpp @@ -662,11 +662,7 @@ void EditorPlugin::make_visible(bool p_visible) { } void EditorPlugin::edit(Object *p_object) { - if (Object::cast_to<Resource>(p_object)) { - GDVIRTUAL_CALL(_edit, Ref<Resource>(Object::cast_to<Resource>(p_object))); - } else { - GDVIRTUAL_CALL(_edit, p_object); - } + GDVIRTUAL_CALL(_edit, p_object); } bool EditorPlugin::handles(Object *p_object) const { diff --git a/editor/editor_plugin.h b/editor/editor_plugin.h index a5a17acdf1..74f46b2d0b 100644 --- a/editor/editor_plugin.h +++ b/editor/editor_plugin.h @@ -164,8 +164,8 @@ protected: GDVIRTUAL0RC(Ref<Texture2D>, _get_plugin_icon) GDVIRTUAL0RC(bool, _has_main_screen) GDVIRTUAL1(_make_visible, bool) - GDVIRTUAL1(_edit, Variant) - GDVIRTUAL1RC(bool, _handles, Variant) + GDVIRTUAL1(_edit, Object *) + GDVIRTUAL1RC(bool, _handles, Object *) GDVIRTUAL0RC(Dictionary, _get_state) GDVIRTUAL1(_set_state, Dictionary) GDVIRTUAL0(_clear) diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index 23e32dcbd8..c90f8e9bf0 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -1490,11 +1490,11 @@ void ED_SHORTCUT_OVERRIDE_ARRAY(const String &p_path, const String &p_feature, c } // Override the existing shortcut only if it wasn't customized by the user (i.e. still "original"). + sc->set_meta("original", events.duplicate(true)); + if (Shortcut::is_event_array_equal(sc->get_events(), sc->get_meta("original"))) { sc->set_events(events); } - - sc->set_meta("original", events.duplicate(true)); } Ref<Shortcut> ED_SHORTCUT(const String &p_path, const String &p_name, Key p_keycode) { diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp index c41bf4b8cc..20b3cf3618 100644 --- a/editor/plugins/sprite_frames_editor_plugin.cpp +++ b/editor/plugins/sprite_frames_editor_plugin.cpp @@ -807,13 +807,17 @@ void SpriteFramesEditor::_animation_name_edited() { return; } + if (new_name.is_empty()) { + new_name = "new_animation"; + } + new_name = new_name.replace("/", "_").replace(",", " "); String name = new_name; int counter = 0; while (frames->has_animation(name)) { counter++; - name = new_name + " " + itos(counter); + name = new_name + "_" + itos(counter); } EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton(); diff --git a/editor/renames_map_3_to_4.cpp b/editor/renames_map_3_to_4.cpp index 4df6092558..277df4e66c 100644 --- a/editor/renames_map_3_to_4.cpp +++ b/editor/renames_map_3_to_4.cpp @@ -291,6 +291,7 @@ const char *RenamesMap3To4::gdscript_function_renames[][2] = { { "get_cull_mask_bit", "get_cull_mask_value" }, // Camera3D { "get_cursor_position", "get_caret_column" }, // LineEdit { "get_d", "get_distance" }, // LineShape2D + { "get_default_length", "get_length" }, // Bone2D { "get_depth_bias_enable", "get_depth_bias_enabled" }, // RDPipelineRasterizationState { "get_device", "get_output_device" }, // AudioServer { "get_device_list", "get_output_device_list" }, // AudioServer @@ -490,6 +491,7 @@ const char *RenamesMap3To4::gdscript_function_renames[][2] = { { "set_cull_mask_bit", "set_cull_mask_value" }, // Camera3D { "set_cursor_position", "set_caret_column" }, // LineEdit { "set_d", "set_distance" }, // WorldMarginShape2D + { "set_default_length", "set_length" }, // Bone2D { "set_depth_bias_enable", "set_depth_bias_enabled" }, // RDPipelineRasterizationState { "set_device", "set_output_device" }, // AudioServer { "set_doubleclick", "set_double_click" }, // InputEventMouseButton @@ -749,6 +751,7 @@ const char *RenamesMap3To4::csharp_function_renames[][2] = { { "GetCullMaskBit", "GetCullMaskValue" }, // Camera3D { "GetCursorPosition", "GetCaretColumn" }, // LineEdit { "GetD", "GetDistance" }, // LineShape2D + { "GetDefaultLength", "GetLength" }, // Bone2D { "GetDepthBiasEnable", "GetDepthBiasEnabled" }, // RDPipelineRasterizationState { "GetDevice", "GetOutputDevice" }, // AudioServer { "GetDeviceList", "GetOutputDeviceList" }, // AudioServer @@ -938,6 +941,7 @@ const char *RenamesMap3To4::csharp_function_renames[][2] = { { "SetCullMaskBit", "SetCullMaskValue" }, // Camera3D { "SetCursorPosition", "SetCaretColumn" }, // LineEdit { "SetD", "SetDistance" }, // WorldMarginShape2D + { "SetDefaultLength", "SetLength" }, // Bone2D { "SetDepthBiasEnable", "SetDepthBiasEnabled" }, // RDPipelineRasterizationState { "SetDevice", "SetOutputDevice" }, // AudioServer { "SetDoubleclick", "SetDoubleClick" }, // InputEventMouseButton |