Update the new project code and add title page

This commit is contained in:
Veronica K. B. Olsen
2020-08-10 21:05:26 +02:00
parent bf35bda942
commit 8a50590a5d
5 changed files with 192 additions and 191 deletions
+16
View File
@@ -314,6 +314,22 @@ class NWTree():
self._handleSeed = theSeed
return
def setFileItemLayout(self, tHandle, itemLayout):
"""Set the nwItemLayout for a specific file.
"""
tItem = self.__getitem__(tHandle)
if tItem is None:
return False
if tItem.itemType != nwItemType.FILE:
logger.error("Item '%s' is not a file" % tHandle)
return False
if not isinstance(itemLayout, nwItemLayout):
return False
tItem.setLayout(itemLayout)
return True
##
# Getters
##