Merge pull request #21 from darloth/fix-19

Fixes #19.
This commit is contained in:
don-tnowe 2023-04-15 20:43:17 +03:00 committed by GitHub
commit c4b5733092
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 6 deletions

View File

@ -95,12 +95,7 @@ func display_folder(folderpath : String, sort_by : String = "", sort_reverse : b
current_path = folderpath
node_columns.update()
await get_tree().create_timer(0.25).timeout
if node_table_root.get_child_count() == 0:
display_folder(folderpath, sort_by, sort_reverse, force_rebuild)
else:
emit_signal("grid_updated")
emit_signal("grid_updated")
func refresh(force_rebuild : bool = true):

View File

@ -39,6 +39,8 @@ func _on_grid_updated():
var sort_type = node_editor_view_root.column_types[node_editor_view_root.columns.find(sort_property)]
var property_values = []
property_values.resize(page_count)
if(node_editor_view_root.rows.size() == 0):
return
for i in page_count:
property_values[i] = node_editor_view_root.rows[i * rows_per_page].get(sort_property)
@ -96,6 +98,7 @@ func _on_button_pressed(button):
func _on_LineEdit_value_changed(value):
rows_per_page = value
current_page = 0
_update_view()