Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 99e0d99

Browse files
authored
fix scalar bar removal (#808)
1 parent 6ae2f80 commit 99e0d99

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

magpylib/_src/display/backend_pyvista.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ def draw_frame(frame_ind):
280280
canvas.add_mesh(pv.PolyData(pts), opacity=0)
281281
try:
282282
canvas.remove_scalar_bar()
283-
except IndexError:
283+
except (StopIteration, IndexError):
284284
# try to remove scalar bar, if none, pass
285285
# needs to happen in the loop otherwise they cummulate
286286
# while the max of 10 is reached and throws a ValueError

0 commit comments

Comments
 (0)