Commit 674a7e05599a4935bd2bea2139d235d7fb632e2e
1 parent
9bbd1365
Exists in
master
and in
68 other branches
ENH: Only showing the raycasting clut widget when the raycasting is activated an…
…d is used a 16 bit preset
Showing
2 changed files
with
8 additions
and
10 deletions
Show diff stats
invesalius/control.py
@@ -139,4 +139,5 @@ class Controller(): | @@ -139,4 +139,5 @@ class Controller(): | ||
139 | # TODO: Chamar grafico tb! | 139 | # TODO: Chamar grafico tb! |
140 | ps.Publisher().sendMessage('Update raycasting preset') | 140 | ps.Publisher().sendMessage('Update raycasting preset') |
141 | else: | 141 | else: |
142 | + prj.Project().raycasting_preset = None | ||
142 | ps.Publisher().sendMessage("Hide raycasting volume") | 143 | ps.Publisher().sendMessage("Hide raycasting volume") |
invesalius/gui/default_viewers.py
@@ -213,23 +213,20 @@ class VolumeInteraction(wx.Panel): | @@ -213,23 +213,20 @@ class VolumeInteraction(wx.Panel): | ||
213 | self.s1 = s1 | 213 | self.s1 = s1 |
214 | 214 | ||
215 | self.clut_raycasting = CLUTRaycastingWidget(self, -1) | 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 | CloseButton(False).MaximizeButton(False).CaptionVisible(0).\ | 217 | CloseButton(False).MaximizeButton(False).CaptionVisible(0).\ |
218 | Hide() | 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 | self.aui_manager.Update() | 222 | self.aui_manager.Update() |
227 | 223 | ||
228 | def ShowRaycastingWidget(self, evt_pubsub=None): | 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 | self.clut_raycasting.SetRaycastPreset(None) | 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 | def HideRaycastingWidget(self, evt_pubsub=None): | 231 | def HideRaycastingWidget(self, evt_pubsub=None): |
235 | p = self.aui_manager.GetPane(self.clut_raycasting) | 232 | p = self.aui_manager.GetPane(self.clut_raycasting) |