Allow creating files in the 'Outtakes' root folder

This commit is contained in:
Veronica K. B. Olsen
2020-12-09 09:21:37 +01:00
parent dc0be12084
commit 8ea153da54
+2 -4
View File
@@ -1027,9 +1027,8 @@ class GuiProjectTreeMenu(QMenu):
"""Update item settings from the nwItem. """Update item settings from the nwItem.
""" """
self.theItem = theItem self.theItem = theItem
theRoot = self.theTree.theProject.projTree.getRootItem(theItem.itemHandle)
if theItem is None or theRoot is None: if theItem is None:
logger.error("Failed to extract information to build tree context menu") logger.error("Failed to extract information to build tree context menu")
return False return False
@@ -1038,14 +1037,13 @@ class GuiProjectTreeMenu(QMenu):
inTrash = theItem.itemParent == trashHandle and trashHandle is not None inTrash = theItem.itemParent == trashHandle and trashHandle is not None
isTrash = theItem.itemHandle == trashHandle and trashHandle is not None isTrash = theItem.itemHandle == trashHandle and trashHandle is not None
isFile = theItem.itemType == nwItemType.FILE isFile = theItem.itemType == nwItemType.FILE
isArch = theRoot.itemClass == nwItemClass.ARCHIVE
isOrph = isFile and theItem.itemParent is None isOrph = isFile and theItem.itemParent is None
showOpen = isFile showOpen = isFile
showView = isFile showView = isFile
showEdit = not isTrash and not isOrph showEdit = not isTrash and not isOrph
showExport = isFile showExport = isFile
showNewFile = not (isTrash or inTrash or isOrph or isArch) showNewFile = not (isTrash or inTrash or isOrph)
showNewFolder = not (isTrash or inTrash or isOrph) showNewFolder = not (isTrash or inTrash or isOrph)
showDelete = not isTrash showDelete = not isTrash
showEmpty = isTrash showEmpty = isTrash