mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Add String::remove_char(s) methods for performance and convenience
This commit is contained in:
parent
cae3d722a3
commit
331a43a9d8
35 changed files with 221 additions and 54 deletions
|
|
@ -721,7 +721,7 @@ void ColorPicker::_update_presets() {
|
|||
}
|
||||
|
||||
if (palette_edited) {
|
||||
palette_name->set_text(vformat("%s*", palette_name->get_text().replace("*", "")));
|
||||
palette_name->set_text(vformat("%s*", palette_name->get_text().remove_char('*')));
|
||||
palette_name->set_tooltip_text(ETR("The changes to this palette have not been saved to a file."));
|
||||
}
|
||||
}
|
||||
|
|
@ -1086,7 +1086,7 @@ void ColorPicker::erase_preset(const Color &p_color) {
|
|||
}
|
||||
}
|
||||
|
||||
palette_name->set_text(vformat("%s*", palette_name->get_text().replace("*", "")));
|
||||
palette_name->set_text(vformat("%s*", palette_name->get_text().remove_char('*')));
|
||||
palette_name->set_tooltip_text(ETR("The changes to this palette have not been saved to a file."));
|
||||
if (presets.is_empty()) {
|
||||
palette_name->set_text("");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue