Commit 49ccd97add28a4ef49bf09937e65384eda2b8fb9

Authored by Paulo Henrique Junqueira Amorim
1 parent abf558df

FIX: Fixed InVesalius don't stop process after image resize dialog and close

invesalius/control.py
@@ -523,7 +523,8 @@ class Controller(): @@ -523,7 +523,8 @@ class Controller():
523 if resolution_percentage < 1.0: 523 if resolution_percentage < 1.0:
524 re_dialog = dialog.ResizeImageDialog() 524 re_dialog = dialog.ResizeImageDialog()
525 re_dialog.SetValue(int(resolution_percentage*100)) 525 re_dialog.SetValue(int(resolution_percentage*100))
526 - re_dialog_value = re_dialog.ShowModal() 526 + re_dialog_value = re_dialog.ShowModal()
  527 + re_dialog.Close()
527 528
528 if re_dialog_value == wx.ID_OK: 529 if re_dialog_value == wx.ID_OK:
529 percentage = re_dialog.GetValue() 530 percentage = re_dialog.GetValue()
invesalius/gui/dialogs.py
@@ -98,7 +98,7 @@ class NumberDialog(wx.Dialog): @@ -98,7 +98,7 @@ class NumberDialog(wx.Dialog):
98 class ResizeImageDialog(wx.Dialog): 98 class ResizeImageDialog(wx.Dialog):
99 99
100 def __init__(self):#, message, value=0): 100 def __init__(self):#, message, value=0):
101 - pre = wx.PreDialog() 101 + pre = self.pre = wx.PreDialog()
102 pre.Create(None, -1, "InVesalius 3", size=wx.DefaultSize, 102 pre.Create(None, -1, "InVesalius 3", size=wx.DefaultSize,
103 pos=wx.DefaultPosition, 103 pos=wx.DefaultPosition,
104 style=wx.DEFAULT_DIALOG_STYLE) 104 style=wx.DEFAULT_DIALOG_STYLE)
@@ -149,6 +149,8 @@ class ResizeImageDialog(wx.Dialog): @@ -149,6 +149,8 @@ class ResizeImageDialog(wx.Dialog):
149 def GetValue(self): 149 def GetValue(self):
150 return self.num_ctrl_porcent.GetValue() 150 return self.num_ctrl_porcent.GetValue()
151 151
  152 + def Close(self):
  153 + self.pre.Destroy()
152 154
153 def ShowNumberDialog(message, value=0): 155 def ShowNumberDialog(message, value=0):
154 dlg = NumberDialog(message, value) 156 dlg = NumberDialog(message, value)
@@ -698,8 +700,8 @@ def ShowAboutDialog(parent): @@ -698,8 +700,8 @@ def ShowAboutDialog(parent):
698 700
699 info = wx.AboutDialogInfo() 701 info = wx.AboutDialogInfo()
700 info.Name = "InVesalius" 702 info.Name = "InVesalius"
701 - info.Version = "3.0 - Beta 4"  
702 - info.Copyright = _("(c) 2007-2012 Renato Archer Information Technology Center - CTI") 703 + info.Version = "3.0 - Beta 5"
  704 + info.Copyright = _("(c) 2007-2013 Renato Archer Information Technology Center - CTI")
703 info.Description = wordwrap(_("InVesalius is a medical imaging program for 3D reconstruction. It uses a sequence of 2D DICOM image files acquired with CT or MRI scanners. InVesalius allows exporting 3D volumes or surfaces as STL files for creating physical models of a patient's anatomy using rapid prototyping technologies. The software is supported by CTI, CNPq and the Brazilian Ministry of Health.\n\n Contact: invesalius@cti.gov.br"), 350, wx.ClientDC(parent)) 705 info.Description = wordwrap(_("InVesalius is a medical imaging program for 3D reconstruction. It uses a sequence of 2D DICOM image files acquired with CT or MRI scanners. InVesalius allows exporting 3D volumes or surfaces as STL files for creating physical models of a patient's anatomy using rapid prototyping technologies. The software is supported by CTI, CNPq and the Brazilian Ministry of Health.\n\n Contact: invesalius@cti.gov.br"), 350, wx.ClientDC(parent))
704 706
705 # _("InVesalius is a software for medical imaging 3D reconstruction. ")+\ 707 # _("InVesalius is a software for medical imaging 3D reconstruction. ")+\
@@ -707,15 +709,15 @@ def ShowAboutDialog(parent): @@ -707,15 +709,15 @@ def ShowAboutDialog(parent):
707 # _("The software also allows generating correspondent STL files,")+\ 709 # _("The software also allows generating correspondent STL files,")+\
708 # _("so the user can print 3D physical models of the patient's anatomy ")+\ 710 # _("so the user can print 3D physical models of the patient's anatomy ")+\
709 # _("using Rapid Prototyping."), 350, wx.ClientDC(parent)) 711 # _("using Rapid Prototyping."), 350, wx.ClientDC(parent))
710 - info.WebSite = ("http://svn.softwarepublico.gov.br/trac/invesalius") 712 + info.WebSite = ("http://www.cti.gov.br/invesalius")
711 info.License = _("GNU GPL (General Public License) version 2") 713 info.License = _("GNU GPL (General Public License) version 2")
712 714
713 info.Developers = ["Paulo Henrique Junqueira Amorim", 715 info.Developers = ["Paulo Henrique Junqueira Amorim",
714 "Thiago Franco de Moraes", 716 "Thiago Franco de Moraes",
715 - "Guilherme Cesar Soares Ruppert",  
716 - "Fabio de Souza Azevedo",  
717 "Jorge Vicente Lopes da Silva", 717 "Jorge Vicente Lopes da Silva",
718 "Tatiana Al-Chueyr (former)", 718 "Tatiana Al-Chueyr (former)",
  719 + "Guilherme Cesar Soares Ruppert (former)",
  720 + "Fabio de Souza Azevedo (former)",
719 "Bruno Lara Bottazzini (contributor)"] 721 "Bruno Lara Bottazzini (contributor)"]
720 722
721 info.Translators = ["Alex P. Natsios", 723 info.Translators = ["Alex P. Natsios",