Skip to content

Commit

Permalink
Merge pull request #963 from vktr/fix/rebuild-file-tree
Browse files Browse the repository at this point in the history
Clear root children when rebuilding file tree
  • Loading branch information
vktr committed Oct 6, 2020
2 parents d45c096 + 886de12 commit 8fba7d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/picotorrent/ui/models/filestoragemodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@ wxDataViewItem FileStorageModel::GetRootItem()
void FileStorageModel::RebuildTree(std::shared_ptr<const lt::torrent_info> ti)
{
m_map.clear();
m_root->children.clear();

if (ti->num_files() == 0)
{
m_root->children.clear();
return;
}

Expand Down

0 comments on commit 8fba7d9

Please sign in to comment.