|
|
|
@@ -209,13 +209,8 @@ private: |
|
|
|
FileTreeComponent::FileTreeComponent (DirectoryContentsList& listToShow)
|
|
|
|
: DirectoryContentsDisplayComponent (listToShow)
|
|
|
|
{
|
|
|
|
FileListTreeItem* const root
|
|
|
|
= new FileListTreeItem (*this, 0, 0, listToShow.getDirectory(),
|
|
|
|
listToShow.getTimeSliceThread());
|
|
|
|
|
|
|
|
root->setSubContentsList (&listToShow, false);
|
|
|
|
setRootItemVisible (false);
|
|
|
|
setRootItem (root);
|
|
|
|
refresh();
|
|
|
|
}
|
|
|
|
|
|
|
|
FileTreeComponent::~FileTreeComponent()
|
|
|
|
@@ -223,6 +218,18 @@ FileTreeComponent::~FileTreeComponent() |
|
|
|
deleteRootItem();
|
|
|
|
}
|
|
|
|
|
|
|
|
void FileTreeComponent::refresh()
|
|
|
|
{
|
|
|
|
deleteRootItem();
|
|
|
|
|
|
|
|
FileListTreeItem* const root
|
|
|
|
= new FileListTreeItem (*this, nullptr, 0, fileList.getDirectory(),
|
|
|
|
fileList.getTimeSliceThread());
|
|
|
|
|
|
|
|
root->setSubContentsList (&fileList, false);
|
|
|
|
setRootItem (root);
|
|
|
|
}
|
|
|
|
|
|
|
|
//==============================================================================
|
|
|
|
File FileTreeComponent::getSelectedFile (const int index) const
|
|
|
|
{
|
|
|
|
|