Commit 43d948cad823e9bad674f87da36c344d1de62b34
1 parent
5206c479
Exists in
master
and in
5 other branches
Only updating 3D slices when they are enabled
Showing
1 changed file
with
7 additions
and
5 deletions
Show diff stats
invesalius/data/viewer_volume.py
... | ... | @@ -833,6 +833,7 @@ class SlicePlane: |
833 | 833 | project = prj.Project() |
834 | 834 | self.original_orientation = project.original_orientation |
835 | 835 | self.Create() |
836 | + self.enabled = False | |
836 | 837 | self.__bind_evt() |
837 | 838 | |
838 | 839 | def __bind_evt(self): |
... | ... | @@ -946,14 +947,15 @@ class SlicePlane: |
946 | 947 | def ChangeSlice(self, pubsub_evt = None): |
947 | 948 | orientation, number = pubsub_evt.data |
948 | 949 | |
949 | - if (orientation == "CORONAL"): | |
950 | + if orientation == "CORONAL" and self.plane_y.GetEnabled(): | |
950 | 951 | ps.Publisher().sendMessage('Update slice 3D', (self.plane_y,orientation)) |
951 | - elif(orientation == "SAGITAL"): | |
952 | + self.Render() | |
953 | + elif orientation == "SAGITAL" and self.plane_x.GetEnabled(): | |
952 | 954 | ps.Publisher().sendMessage('Update slice 3D', (self.plane_x,orientation)) |
953 | - else: | |
955 | + self.Render() | |
956 | + elif orientation == 'AXIAL' and self.plane_z.GetEnabled() : | |
954 | 957 | ps.Publisher().sendMessage('Update slice 3D', (self.plane_z,orientation)) |
955 | - | |
956 | - self.Render() | |
958 | + self.Render() | |
957 | 959 | |
958 | 960 | def UpdateAllSlice(self, pubsub_evt): |
959 | 961 | ps.Publisher().sendMessage('Update slice 3D', (self.plane_y,"CORONAL")) | ... | ... |