You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-23 15:16:17 +00:00
Show "No Recent Scenes" under Open Recent instead of clearing nothing
This commit is contained in:
@@ -4807,6 +4807,10 @@ void EditorNode::_update_recent_scenes() {
|
||||
Array rc = EditorSettings::get_singleton()->get_project_metadata("recent_files", "scenes", Array());
|
||||
recent_scenes->clear();
|
||||
|
||||
if (rc.size() == 0) {
|
||||
recent_scenes->add_item(TTR("No Recent Scenes"), -1);
|
||||
recent_scenes->set_item_disabled(-1, true);
|
||||
} else {
|
||||
String path;
|
||||
for (int i = 0; i < rc.size(); i++) {
|
||||
path = rc[i];
|
||||
@@ -4815,6 +4819,7 @@ void EditorNode::_update_recent_scenes() {
|
||||
|
||||
recent_scenes->add_separator();
|
||||
recent_scenes->add_shortcut(ED_SHORTCUT("editor/clear_recent", TTRC("Clear Recent Scenes")));
|
||||
}
|
||||
recent_scenes->set_item_auto_translate_mode(-1, AUTO_TRANSLATE_MODE_ALWAYS);
|
||||
recent_scenes->reset_size();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user