1
0
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:
A Thousand Ships
2024-11-16 17:16:07 +01:00
parent b5bdb88062
commit 466590d0ec
58 changed files with 210 additions and 210 deletions

View File

@@ -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();