Commit 00860037 authored by Daniel de Souza Baulé's avatar Daniel de Souza Baulé
Browse files

Merge branch 'tcc/daniel.baule' into 'dev'

Fixing "UnboundLocalError: local variable 'screen' referenced before assignment"

See merge request 100000000394729/sketch2aia!12
parents 5b1a56f9 cbc1a525
Showing with 3 additions and 2 deletions
+3 -2
......@@ -99,10 +99,11 @@ def detect(projectPath, sketchList, mainScreen=0, projectName='MyProject',listTy
'''
componentList = list()
screen = list()
for component in result:
if component[0] == 'Screen':
screen = Component(component[0], component[1], component[2][0], component[2][1], component[2][2], component[2][3])
screen.append(Component(component[0], component[1], component[2][0], component[2][1], component[2][2], component[2][3]))
else:
componentList.append(Component(component[0], component[1], component[2][0], component[2][1], component[2][2], component[2][3]))
......@@ -125,7 +126,7 @@ def detect(projectPath, sketchList, mainScreen=0, projectName='MyProject',listTy
i += 1
# Generate and save preview
save_preview(imagePath, componentList + [screen], previewPath, language=lang)
save_preview(imagePath, componentList + screen, previewPath, language=lang)
#print(str(Alignment.align(componentList)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment