mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Merge pull request #112719 from jinyangcruise/fix_error_when_change_language
Fix error when changing language in `FindInFilesPanel`
This commit is contained in:
@@ -872,13 +872,19 @@ void FindInFilesPanel::_notification(int p_what) {
|
||||
|
||||
TreeItem *file_item = _results_display->get_root()->get_first_child();
|
||||
while (file_item) {
|
||||
file_item->set_button_tooltip_text(0, FIND_BUTTON_REPLACE, TTR("Replace all matches in file"));
|
||||
file_item->set_button_tooltip_text(0, FIND_BUTTON_REMOVE, TTR("Remove result"));
|
||||
if (_with_replace) {
|
||||
file_item->set_button_tooltip_text(0, file_item->get_button_by_id(0, FIND_BUTTON_REPLACE), TTR("Replace all matches in file"));
|
||||
}
|
||||
file_item->set_button_tooltip_text(0, file_item->get_button_by_id(0, FIND_BUTTON_REMOVE), TTR("Remove result"));
|
||||
|
||||
TreeItem *result_item = file_item->get_first_child();
|
||||
while (result_item) {
|
||||
result_item->set_button_tooltip_text(_with_replace ? 1 : 0, FIND_BUTTON_REPLACE, TTR("Replace"));
|
||||
result_item->set_button_tooltip_text(_with_replace ? 1 : 0, FIND_BUTTON_REMOVE, TTR("Remove result"));
|
||||
if (_with_replace) {
|
||||
result_item->set_button_tooltip_text(1, file_item->get_button_by_id(0, FIND_BUTTON_REPLACE), TTR("Replace"));
|
||||
result_item->set_button_tooltip_text(1, file_item->get_button_by_id(0, FIND_BUTTON_REMOVE), TTR("Remove result"));
|
||||
} else {
|
||||
result_item->set_button_tooltip_text(0, file_item->get_button_by_id(0, FIND_BUTTON_REMOVE), TTR("Remove result"));
|
||||
}
|
||||
result_item = result_item->get_next();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user