Simplify and speed up actions connected to file tree popup menu

This commit is contained in:
Mike Gelfand
2015-08-16 22:07:09 +00:00
parent 7f45029f18
commit 63e4700a10
5 changed files with 113 additions and 81 deletions

View File

@@ -545,7 +545,7 @@ FileTreeModel::openFile (const QModelIndex& index)
return false;
FileTreeItem * const item = itemFromIndex (index);
if (item->childCount () != 0 || !item->isComplete ())
if (item->fileIndex () < 0 || !item->isComplete ())
return false;
emit openRequested (item->path ());