From 9823122ac0608cde48e07c76da2166f6d2a0cfb7 Mon Sep 17 00:00:00 2001 From: Victor Hugo Souza Date: Mon, 18 Oct 2021 04:56:22 +0300 Subject: [PATCH] FIX: Error raised if 3D not created before when adding a peeling surface (#387) --- invesalius/data/viewer_volume.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/invesalius/data/viewer_volume.py b/invesalius/data/viewer_volume.py index 0f36f8f..7e78c76 100644 --- a/invesalius/data/viewer_volume.py +++ b/invesalius/data/viewer_volume.py @@ -1455,7 +1455,8 @@ class Viewer(wx.Panel): self.ren.RemoveActor(self.object_orientation_torus_actor) self.ren.RemoveActor(self.obj_projection_arrow_actor) self.actor_peel = None - self.ball_actor.SetVisibility(1) + if self.ball_actor: + self.ball_actor.SetVisibility(1) if flag and actor: self.ren.AddActor(actor) -- libgit2 0.21.2