File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -4807,14 +4807,19 @@ void EditorNode::_update_recent_scenes() {
48074807 Array rc = EditorSettings::get_singleton ()->get_project_metadata (" recent_files" , " scenes" , Array ());
48084808 recent_scenes->clear ();
48094809
4810- String path;
4811- for (int i = 0 ; i < rc.size (); i++) {
4812- path = rc[i];
4813- recent_scenes->add_item (path.replace (" res://" , " " ), i);
4814- }
4810+ if (rc.size () == 0 ) {
4811+ recent_scenes->add_item (TTR (" No Recent Scenes" ), -1 );
4812+ recent_scenes->set_item_disabled (-1 , true );
4813+ } else {
4814+ String path;
4815+ for (int i = 0 ; i < rc.size (); i++) {
4816+ path = rc[i];
4817+ recent_scenes->add_item (path.replace (" res://" , " " ), i);
4818+ }
48154819
4816- recent_scenes->add_separator ();
4817- recent_scenes->add_shortcut (ED_SHORTCUT (" editor/clear_recent" , TTRC (" Clear Recent Scenes" )));
4820+ recent_scenes->add_separator ();
4821+ recent_scenes->add_shortcut (ED_SHORTCUT (" editor/clear_recent" , TTRC (" Clear Recent Scenes" )));
4822+ }
48184823 recent_scenes->set_item_auto_translate_mode (-1 , AUTO_TRANSLATE_MODE_ALWAYS);
48194824 recent_scenes->reset_size ();
48204825}
You can’t perform that action at this time.
0 commit comments