Remove name as a required parameter for new root folders since no part of the GUI uses it

This commit is contained in:
Veronica Berglyd Olsen
2022-05-21 22:10:25 +02:00
parent aeaaaaf3af
commit 78b97ce8fb
6 changed files with 44 additions and 49 deletions
+1 -4
View File
@@ -37,7 +37,6 @@ from PyQt5.QtWidgets import (
from novelwriter.core import NWDoc
from novelwriter.enum import nwItemType, nwItemClass, nwItemLayout, nwAlert
from novelwriter.constants import trConst, nwLabels
logger = logging.getLogger(__name__)
@@ -176,9 +175,7 @@ class GuiProjectTree(QTreeWidget):
if itemType == nwItemType.ROOT and isinstance(itemClass, nwItemClass):
tHandle = self.theProject.newRoot(
trConst(nwLabels.CLASS_NAME[itemClass]), itemClass
)
tHandle = self.theProject.newRoot(itemClass)
elif itemType in (nwItemType.FILE, nwItemType.FOLDER):