Commit 674a7e05599a4935bd2bea2139d235d7fb632e2e

Authored by tfmoraes
1 parent 9bbd1365

ENH: Only showing the raycasting clut widget when the raycasting is activated an…

…d is used a 16 bit preset
invesalius/control.py
... ... @@ -139,4 +139,5 @@ class Controller():
139 139 # TODO: Chamar grafico tb!
140 140 ps.Publisher().sendMessage('Update raycasting preset')
141 141 else:
  142 + prj.Project().raycasting_preset = None
142 143 ps.Publisher().sendMessage("Hide raycasting volume")
... ...
invesalius/gui/default_viewers.py
... ... @@ -213,23 +213,20 @@ class VolumeInteraction(wx.Panel):
213 213 self.s1 = s1
214 214  
215 215 self.clut_raycasting = CLUTRaycastingWidget(self, -1)
216   - self.s2 = wx.aui.AuiPaneInfo().Centre().\
  216 + self.s2 = wx.aui.AuiPaneInfo().Bottom().BestSize((200, 200)).\
217 217 CloseButton(False).MaximizeButton(False).CaptionVisible(0).\
218 218 Hide()
219 219  
220   - if sys.platform == 'win32':
221   - self.aui_manager.AddPane(p1, s1)
222   - self.aui_manager.AddPane(self.clut_raycasting, self.s2)
223   - else:
224   - self.aui_manager.AddPane(self.clut_raycasting, self.s2)
225   - self.aui_manager.AddPane(p1, s1)
  220 + self.aui_manager.AddPane(p1, s1)
  221 + self.aui_manager.AddPane(self.clut_raycasting, self.s2)
226 222 self.aui_manager.Update()
227 223  
228 224 def ShowRaycastingWidget(self, evt_pubsub=None):
229   - p = self.aui_manager.GetPane(self.clut_raycasting)
230   - p.Show()
231   - self.aui_manager.Update()
232 225 self.clut_raycasting.SetRaycastPreset(None)
  226 + if self.clut_raycasting.to_draw_points:
  227 + p = self.aui_manager.GetPane(self.clut_raycasting)
  228 + p.Show()
  229 + self.aui_manager.Update()
233 230  
234 231 def HideRaycastingWidget(self, evt_pubsub=None):
235 232 p = self.aui_manager.GetPane(self.clut_raycasting)
... ...