mirror of
https://github.com/Relintai/godot-resources-as-sheets-plugin.git
synced 2024-11-14 15:17:20 +01:00
Fix infinite realoading if table is empty
This commit is contained in:
parent
0937f685b4
commit
f26eabf69b
@ -92,7 +92,7 @@ func _on_filesystem_changed():
|
|||||||
break
|
break
|
||||||
|
|
||||||
|
|
||||||
func display_folder(folderpath : String, sort_by : String = "", sort_reverse : bool = false, force_rebuild : bool = false):
|
func display_folder(folderpath : String, sort_by : String = "", sort_reverse : bool = false, force_rebuild : bool = false, is_echo : bool = false):
|
||||||
if folderpath == "": return # Root folder resources tend to have MANY properties.W
|
if folderpath == "": return # Root folder resources tend to have MANY properties.W
|
||||||
$"HeaderContentSplit/MarginContainer/FooterContentSplit/Panel/Label".visible = false
|
$"HeaderContentSplit/MarginContainer/FooterContentSplit/Panel/Label".visible = false
|
||||||
if folderpath.ends_with(".tres") && !folderpath.ends_with(SpreadsheetImport.SUFFIX):
|
if folderpath.ends_with(".tres") && !folderpath.ends_with(SpreadsheetImport.SUFFIX):
|
||||||
@ -115,10 +115,11 @@ func display_folder(folderpath : String, sort_by : String = "", sort_reverse : b
|
|||||||
current_path = folderpath
|
current_path = folderpath
|
||||||
_update_hidden_columns()
|
_update_hidden_columns()
|
||||||
_update_column_sizes()
|
_update_column_sizes()
|
||||||
|
|
||||||
yield(get_tree().create_timer(0.5), "timeout")
|
if is_echo: return
|
||||||
|
yield(get_tree().create_timer(0.25), "timeout")
|
||||||
if get_node(path_table_root).get_child_count() == 0:
|
if get_node(path_table_root).get_child_count() == 0:
|
||||||
display_folder(folderpath, sort_by, sort_reverse, force_rebuild)
|
display_folder(folderpath, sort_by, sort_reverse, force_rebuild, true)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
emit_signal("grid_updated")
|
emit_signal("grid_updated")
|
||||||
|
Loading…
Reference in New Issue
Block a user