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
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) | ... | ... |