You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
Use get_slicec instead of get_slice for single character splitters
This commit is contained in:
@@ -503,7 +503,7 @@ void AnimationPlayerEditor::_animation_rename() {
|
||||
|
||||
// Remove library prefix if present.
|
||||
if (selected_name.contains_char('/')) {
|
||||
selected_name = selected_name.get_slice("/", 1);
|
||||
selected_name = selected_name.get_slicec('/', 1);
|
||||
}
|
||||
|
||||
name_dialog->set_title(TTR("Rename Animation"));
|
||||
@@ -536,7 +536,7 @@ void AnimationPlayerEditor::_animation_remove_confirmed() {
|
||||
|
||||
// For names of form lib_name/anim_name, remove library name prefix.
|
||||
if (current.contains_char('/')) {
|
||||
current = current.get_slice("/", 1);
|
||||
current = current.get_slicec('/', 1);
|
||||
}
|
||||
EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
|
||||
undo_redo->create_action(TTR("Remove Animation"));
|
||||
@@ -625,8 +625,8 @@ void AnimationPlayerEditor::_animation_name_edited() {
|
||||
// Extract library prefix if present.
|
||||
String new_library_prefix = "";
|
||||
if (current.contains_char('/')) {
|
||||
new_library_prefix = current.get_slice("/", 0) + "/";
|
||||
current = current.get_slice("/", 1);
|
||||
new_library_prefix = current.get_slicec('/', 0) + "/";
|
||||
current = current.get_slicec('/', 1);
|
||||
}
|
||||
|
||||
undo_redo->create_action(TTR("Rename Animation"));
|
||||
@@ -1340,7 +1340,7 @@ void AnimationPlayerEditor::_animation_duplicate() {
|
||||
|
||||
if (new_name.contains_char('/')) {
|
||||
// Discard library prefix.
|
||||
new_name = new_name.get_slice("/", 1);
|
||||
new_name = new_name.get_slicec('/', 1);
|
||||
}
|
||||
|
||||
_update_name_dialog_library_dropdown();
|
||||
|
||||
Reference in New Issue
Block a user