mirror of
https://github.com/Relintai/material-maker.git
synced 2024-12-23 21:16:54 +01:00
Merge pull request #44 from Calinou/open-recent-display-no-items-found
Display a disabled item if no recent materials were found in Open Recent
This commit is contained in:
commit
2d236a1735
@ -123,6 +123,11 @@ func create_menu(menu, menu_name):
|
||||
|
||||
func create_menu_load_recent(menu):
|
||||
menu.clear()
|
||||
|
||||
if recent_files.empty():
|
||||
menu.add_item("No items found", 0)
|
||||
menu.set_item_disabled(0, true)
|
||||
else:
|
||||
for i in recent_files.size():
|
||||
menu.add_item(recent_files[i], i)
|
||||
if !menu.is_connected("id_pressed", self, "_on_LoadRecent_id_pressed"):
|
||||
|
Loading…
Reference in New Issue
Block a user