Commit 1bbb3a3ae2e65660babb068088febf89cd187564

Authored by tfmoraes
1 parent 1289f0e2

The fonts from dialog used to create a new surface were very small, it was becau…

…se the parent of this dialog was setted
invesalius/gui/data_notebook.py
@@ -617,7 +617,7 @@ class SurfaceButtonControlPanel(wx.Panel): @@ -617,7 +617,7 @@ class SurfaceButtonControlPanel(wx.Panel):
617 617
618 def OnNew(self): 618 def OnNew(self):
619 sl = slice_.Slice() 619 sl = slice_.Slice()
620 - dialog = dlg.SurfaceCreationDialog(self, -1, 620 + dialog = dlg.SurfaceCreationDialog(None, -1,
621 _('InVesalius 3 - New surface'), 621 _('InVesalius 3 - New surface'),
622 mask_edited=sl.current_mask.was_edited) 622 mask_edited=sl.current_mask.was_edited)
623 try: 623 try:
invesalius/gui/dialogs.py
@@ -1011,7 +1011,7 @@ class SurfaceCreationDialog(wx.Dialog): @@ -1011,7 +1011,7 @@ class SurfaceCreationDialog(wx.Dialog):
1011 # method. 1011 # method.
1012 pre = wx.PreDialog() 1012 pre = wx.PreDialog()
1013 pre.SetExtraStyle(wx.DIALOG_EX_CONTEXTHELP) 1013 pre.SetExtraStyle(wx.DIALOG_EX_CONTEXTHELP)
1014 - pre.Create(parent, ID, title, pos, (50,30), style) 1014 + pre.Create(parent, ID, title, pos, (500,300), style)
1015 1015
1016 # This extra style can be set after the UI object has been created. 1016 # This extra style can be set after the UI object has been created.
1017 if 'wxMac' in wx.PlatformInfo and useMetal: 1017 if 'wxMac' in wx.PlatformInfo and useMetal:
@@ -1028,12 +1028,12 @@ class SurfaceCreationDialog(wx.Dialog): @@ -1028,12 +1028,12 @@ class SurfaceCreationDialog(wx.Dialog):
1028 self.nsd.Bind(EVT_MASK_SET, self.OnSetMask) 1028 self.nsd.Bind(EVT_MASK_SET, self.OnSetMask)
1029 surface_options_sizer = wx.StaticBoxSizer(wx.StaticBox(self, -1, 1029 surface_options_sizer = wx.StaticBoxSizer(wx.StaticBox(self, -1,
1030 _('Surface creation options')), wx.VERTICAL) 1030 _('Surface creation options')), wx.VERTICAL)
1031 - surface_options_sizer.Add(self.nsd, 0, wx.EXPAND|wx.ALL, 5) 1031 + surface_options_sizer.Add(self.nsd, 1, wx.EXPAND|wx.ALL, 5)
1032 1032
1033 self.ca = SurfaceMethodPanel(self, -1, mask_edited) 1033 self.ca = SurfaceMethodPanel(self, -1, mask_edited)
1034 surface_method_sizer = wx.StaticBoxSizer(wx.StaticBox(self, -1, 1034 surface_method_sizer = wx.StaticBoxSizer(wx.StaticBox(self, -1,
1035 _('Surface creation method')), wx.VERTICAL) 1035 _('Surface creation method')), wx.VERTICAL)
1036 - surface_method_sizer.Add(self.ca, 0, wx.EXPAND|wx.ALL, 5) 1036 + surface_method_sizer.Add(self.ca, 1, wx.EXPAND|wx.ALL, 5)
1037 1037
1038 btn_ok = wx.Button(self, wx.ID_OK) 1038 btn_ok = wx.Button(self, wx.ID_OK)
1039 btn_ok.SetDefault() 1039 btn_ok.SetDefault()
@@ -1055,8 +1055,6 @@ class SurfaceCreationDialog(wx.Dialog): @@ -1055,8 +1055,6 @@ class SurfaceCreationDialog(wx.Dialog):
1055 self.SetSizer(sizer) 1055 self.SetSizer(sizer)
1056 sizer.Fit(self) 1056 sizer.Fit(self)
1057 1057
1058 - self.Show()  
1059 -  
1060 def OnSetMask(self, evt): 1058 def OnSetMask(self, evt):
1061 mask = proj.Project().mask_dict[evt.mask_index] 1059 mask = proj.Project().mask_dict[evt.mask_index]
1062 self.ca.mask_edited = mask.was_edited 1060 self.ca.mask_edited = mask.was_edited
invesalius/gui/task_surface.py
@@ -132,7 +132,7 @@ class InnerTaskPanel(wx.Panel): @@ -132,7 +132,7 @@ class InnerTaskPanel(wx.Panel):
132 def OnLinkNewSurface(self, evt=None): 132 def OnLinkNewSurface(self, evt=None):
133 #import gui.dialogs as dlg 133 #import gui.dialogs as dlg
134 sl = slice_.Slice() 134 sl = slice_.Slice()
135 - dialog = dlg.SurfaceCreationDialog(self, -1, 135 + dialog = dlg.SurfaceCreationDialog(None, -1,
136 _('InVesalius 3 - New surface'), 136 _('InVesalius 3 - New surface'),
137 mask_edited=sl.current_mask.was_edited) 137 mask_edited=sl.current_mask.was_edited)
138 138