diff -r dfc89403b426 -r ac800d2700d2 MultiProject/AddProjectDialog.py --- a/MultiProject/AddProjectDialog.py Sat Jan 12 18:25:04 2019 +0100 +++ b/MultiProject/AddProjectDialog.py Sat Jan 12 19:32:22 2019 +0100 @@ -25,15 +25,21 @@ """ Class implementing the add project dialog. """ - def __init__(self, parent=None, startdir=None, project=None, - categories=None): + def __init__(self, parent=None, startdir="", project=None, + categories=None, category=""): """ Constructor - @param parent parent widget of this dialog (QWidget) - @param startdir start directory for the selection dialog (string) + @param parent parent widget of this dialog + @type QWidget + @param startdir start directory for the selection dialog + @type str @param project dictionary containing project data - @param categories list of already used categories (list of string) + @type dict + @param categories list of already used categories + @type list of str + @param category category to be preset + @type str """ super(AddProjectDialog, self).__init__(parent) self.setupUi(self) @@ -44,6 +50,7 @@ if categories: self.categoryComboBox.addItem("") self.categoryComboBox.addItems(sorted(categories)) + self.categoryComboBox.setEditText(category) self.startdir = startdir self.uid = ""