mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
fixed creating new collection
This commit is contained in:
parent
31c390aa27
commit
e106959fbd
@ -733,15 +733,16 @@ void SharedFilesDialog::sendLinkTo()
|
||||
|
||||
void SharedFilesDialog::collCreate()
|
||||
{
|
||||
#ifdef TODO_COLLECTION
|
||||
QModelIndexList lst = getSelected();
|
||||
|
||||
std::vector <DirDetails> dirVec;
|
||||
model->getDirDetailsFromSelect(lst, dirVec);
|
||||
|
||||
auto RemoteMode = isRemote();
|
||||
FileSearchFlags f = RemoteMode?RS_FILE_HINTS_REMOTE:RS_FILE_HINTS_LOCAL ;
|
||||
|
||||
QString dir_name;
|
||||
|
||||
if(!RemoteMode)
|
||||
{
|
||||
if(!dirVec.empty())
|
||||
@ -750,8 +751,15 @@ void SharedFilesDialog::collCreate()
|
||||
dir_name = QDir(QString::fromUtf8(details.name.c_str())).dirName();
|
||||
}
|
||||
}
|
||||
RsCollection(dirVec,f).openNewColl(parent,dir_name);
|
||||
#endif
|
||||
|
||||
RsFileTree tree;
|
||||
|
||||
for(uint32_t i=0;i<dirVec.size();++i)
|
||||
tree.addFileTree(tree.root(),*RsFileTree::fromDirDetails(dirVec[i],RemoteMode,true));
|
||||
|
||||
RsCollectionDialog::openNewCollection(tree);
|
||||
|
||||
//auto ft = RsFileTree::fromDirDetails(details,remote);
|
||||
}
|
||||
|
||||
void SharedFilesDialog::collModif()
|
||||
|
Loading…
Reference in New Issue
Block a user