Commit 9823122ac0608cde48e07c76da2166f6d2a0cfb7
Committed by
GitHub
1 parent
55cc5637
Exists in
master
FIX: Error raised if 3D not created before when adding a peeling surface (#387)
Showing
1 changed file
with
2 additions
and
1 deletions
Show diff stats
invesalius/data/viewer_volume.py
@@ -1455,7 +1455,8 @@ class Viewer(wx.Panel): | @@ -1455,7 +1455,8 @@ class Viewer(wx.Panel): | ||
1455 | self.ren.RemoveActor(self.object_orientation_torus_actor) | 1455 | self.ren.RemoveActor(self.object_orientation_torus_actor) |
1456 | self.ren.RemoveActor(self.obj_projection_arrow_actor) | 1456 | self.ren.RemoveActor(self.obj_projection_arrow_actor) |
1457 | self.actor_peel = None | 1457 | self.actor_peel = None |
1458 | - self.ball_actor.SetVisibility(1) | 1458 | + if self.ball_actor: |
1459 | + self.ball_actor.SetVisibility(1) | ||
1459 | 1460 | ||
1460 | if flag and actor: | 1461 | if flag and actor: |
1461 | self.ren.AddActor(actor) | 1462 | self.ren.AddActor(actor) |