Commit 4dcf4dfcb1fb64ae2863671d453531003815b98b
1 parent
1bbb3a3a
Exists in
master
and in
5 other branches
In MacOSX it wasn't possible to use mouse in the dialog used to create a new surface
Showing
1 changed file
with
9 additions
and
5 deletions
Show diff stats
invesalius/gui/dialogs.py
... | ... | @@ -1024,15 +1024,18 @@ class SurfaceCreationDialog(wx.Dialog): |
1024 | 1024 | |
1025 | 1025 | self.CenterOnScreen() |
1026 | 1026 | |
1027 | + # It's necessary to create a staticbox before is children widgets | |
1028 | + # because otherwise in MacOSX it'll not be possible to use the mouse in | |
1029 | + # static's children widgets. | |
1030 | + sb_nsd = wx.StaticBox(self, -1, _('Surface creation options')) | |
1027 | 1031 | self.nsd = SurfaceCreationOptionsPanel(self, -1) |
1028 | 1032 | self.nsd.Bind(EVT_MASK_SET, self.OnSetMask) |
1029 | - surface_options_sizer = wx.StaticBoxSizer(wx.StaticBox(self, -1, | |
1030 | - _('Surface creation options')), wx.VERTICAL) | |
1033 | + surface_options_sizer = wx.StaticBoxSizer(sb_nsd, wx.VERTICAL) | |
1031 | 1034 | surface_options_sizer.Add(self.nsd, 1, wx.EXPAND|wx.ALL, 5) |
1032 | 1035 | |
1036 | + sb_ca = wx.StaticBox(self, -1, _('Surface creation method')) | |
1033 | 1037 | self.ca = SurfaceMethodPanel(self, -1, mask_edited) |
1034 | - surface_method_sizer = wx.StaticBoxSizer(wx.StaticBox(self, -1, | |
1035 | - _('Surface creation method')), wx.VERTICAL) | |
1038 | + surface_method_sizer = wx.StaticBoxSizer(sb_ca, wx.VERTICAL) | |
1036 | 1039 | surface_method_sizer.Add(self.ca, 1, wx.EXPAND|wx.ALL, 5) |
1037 | 1040 | |
1038 | 1041 | btn_ok = wx.Button(self, wx.ID_OK) |
... | ... | @@ -1178,6 +1181,7 @@ class CAOptions(wx.Panel): |
1178 | 1181 | self._build_widgets() |
1179 | 1182 | |
1180 | 1183 | def _build_widgets(self): |
1184 | + sb = wx.StaticBox(self, -1, _('Context aware options')) | |
1181 | 1185 | self.angle = floatspin.FloatSpin(self, -1, value=0.7, min_val=0.0, |
1182 | 1186 | max_val=1.0, increment=0.1, |
1183 | 1187 | digits=1) |
... | ... | @@ -1202,7 +1206,7 @@ class CAOptions(wx.Panel): |
1202 | 1206 | layout_sizer.Add(wx.StaticText(self, -1, _(u'N. steps:')), 0, wx.EXPAND) |
1203 | 1207 | layout_sizer.Add(self.steps, 0, wx.EXPAND) |
1204 | 1208 | |
1205 | - self.main_sizer = wx.StaticBoxSizer(wx.StaticBox(self, -1, _('Context aware options')), wx.VERTICAL) | |
1209 | + self.main_sizer = wx.StaticBoxSizer(sb, wx.VERTICAL) | |
1206 | 1210 | self.main_sizer.Add(layout_sizer, 0, wx.EXPAND | wx.ALL, 5) |
1207 | 1211 | self.SetSizer(self.main_sizer) |
1208 | 1212 | ... | ... |