summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_inspector.h2
-rw-r--r--editor/editor_plugin.cpp6
-rw-r--r--editor/editor_plugin.h4
-rw-r--r--editor/plugins/sprite_frames_editor_plugin.cpp6
4 files changed, 9 insertions, 9 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_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/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();