Skip to content
This repository was archived by the owner on May 18, 2019. It is now read-only.

Commit 3f9491d

Browse files
sjoelundOpenModelica-Hudson
authored andcommitted
Handle empty rotation in icon generation script
Belonging to [master]: - #2353
1 parent 38efbe7 commit 3f9491d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Examples/generate_icons.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,8 +387,10 @@ def getGraphicsWithPortsForClass(modelicaClass):
387387
g['transformation'] = {}
388388
g['transformation']['origin'] = [origin_x, origin_y]
389389
g['transformation']['extent'] = [[x0, y0], [x1, y1]]
390-
g['transformation']['rotation'] = rotation
391-
390+
if isinstance(rotation,dict):
391+
g['transformation']['rotation'] = 0.0
392+
else:
393+
g['transformation']['rotation'] = rotation
392394
graphics['ports'].append(g)
393395

394396
return graphics

0 commit comments

Comments
 (0)