job selector for a tool shows not the job label but the job name

This commit is contained in:
schnebeck
2017-08-10 20:53:11 +02:00
committed by wmayer
parent 7806f7b300
commit 523fa6be20

View File

@@ -477,14 +477,14 @@ def addToJob(obj, jobname=None):
else:
# form = FreeCADGui.PySideUic.loadUi(FreeCAD.getHomePath() + "Mod/Path/DlgJobChooser.ui")
form = FreeCADGui.PySideUic.loadUi(":/panels/DlgJobChooser.ui")
mylist = [i.Name for i in jobs]
mylist = [i.Label for i in jobs]
form.cboProject.addItems(mylist)
r = form.exec_()
if r is False:
return None
else:
print(form.cboProject.currentText())
job = [i for i in jobs if i.Name == form.cboProject.currentText()][0]
job = [i for i in jobs if i.Label == form.cboProject.currentText()][0]
if obj:
addObjectToJob(obj, job)