Skip to content

Commit 6a25e00

Browse files
committed
Merge pull request #1140 from UV-CDAT/issue_1139_genTextActor_returns_None
prepPrimitivie function occasionally returned None
2 parents 541db89 + 57c1778 commit 6a25e00

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

Packages/vcs/Lib/vcs2vtk.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -851,15 +851,15 @@ def genTextActor(renderer,string=None,x=None,y=None,to='default',tt='default',cm
851851
if isinstance(tt,str):
852852
tt = vcs.elements["texttable"][tt]
853853
if tt.priority==0:
854-
return
854+
return []
855855
if string is None:
856856
string = tt.string
857857
if x is None:
858858
x = tt.x
859859
if y is None:
860860
y = tt.y
861861
if x is None or y is None or string in [['',],[]]:
862-
return
862+
return []
863863

864864
n = max(len(x),len(y),len(string))
865865
for a in [x,y,string]:
@@ -909,7 +909,7 @@ def prepPrimitive(prim):
909909
def prepFillarea(renWin,farea,cmap=None):
910910
n = prepPrimitive(farea)
911911
if n==0:
912-
return
912+
return []
913913
actors =[]
914914

915915
# Find color map:
@@ -1173,7 +1173,7 @@ def scaleMarkerGlyph(g, gs, pd, a):
11731173
def prepMarker(renWin,marker,cmap=None):
11741174
n=prepPrimitive(marker)
11751175
if n==0:
1176-
return
1176+
return []
11771177
actors=[]
11781178
for i in range(n):
11791179
g = vtk.vtkGlyph2D()
@@ -1211,7 +1211,7 @@ def prepLine(renWin,line,cmap=None):
12111211
number_lines = prepPrimitive(line)
12121212

12131213
if number_lines == 0:
1214-
return
1214+
return []
12151215

12161216
actors = []
12171217

0 commit comments

Comments
 (0)