From f2330bfef697a36cb8483da1780a30783f44e9b1 Mon Sep 17 00:00:00 2001 From: paulojamorim Date: Fri, 4 Sep 2009 17:31:41 +0000 Subject: [PATCH] ENH: Improving of the code --- invesalius/data/viewer_volume.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/invesalius/data/viewer_volume.py b/invesalius/data/viewer_volume.py index f9feced..4a0fd75 100755 --- a/invesalius/data/viewer_volume.py +++ b/invesalius/data/viewer_volume.py @@ -319,7 +319,11 @@ class SlicePlane: project = prj.Project() self.original_orientation = project.original_orientation self.Create() - + self.__bind_evt() + + def __bind_evt(self): + ps.Publisher().subscribe(self.Enable, 'Enable plane') + ps.Publisher().subscribe(self.Disable, 'Disable plane') def Create(self): @@ -386,10 +390,7 @@ class SlicePlane: ps.Publisher().sendMessage('Set Widget Interactor', plane_x) ps.Publisher().sendMessage('Set Widget Interactor', plane_y) ps.Publisher().sendMessage('Set Widget Interactor', plane_z) - - ps.Publisher().subscribe(self.Enable, 'Enable plane') - ps.Publisher().subscribe(self.Disable, 'Disable plane') - + self.Enable() self.Disable() -- libgit2 0.21.2