Skip to content

Commit

Permalink
Fixing file model updates to reflect changes in Name on both the Name…
Browse files Browse the repository at this point in the history
… and Thumb columns, for consistency between different views.
  • Loading branch information
jonoomph committed Jun 21, 2024
1 parent cbf2334 commit c832fee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/windows/models/files_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,11 @@ def update_file_thumbnail(self, file_id):
item.setIcon(thumb_icon)
item.setText(name)

# Update display name
text_index = id_index.sibling(id_index.row(), 1)
item = m.itemFromIndex(text_index)
item.setText(name)

# Emit signal when model is updated
self.ModelRefreshed.emit()

Expand Down
2 changes: 1 addition & 1 deletion src/windows/views/files_treeview.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,4 +233,4 @@ def __init__(self, model, *args):
self.files_model.ModelRefreshed.connect(self.refresh_view)

# setup filter events
# self.files_model.model.itemChanged.connect(self.value_updated)
self.files_model.model.itemChanged.connect(self.value_updated)

0 comments on commit c832fee

Please sign in to comment.