Commit 449b32c1ab1ae18cab88c07432359ac481bbf295

Authored by Thiago Franco de Moraes
1 parent 4b9937f4
Exists in ffill_gui

Return returncode from dialog in select parts

invesalius/data/styles.py
@@ -1907,7 +1907,7 @@ class SelectMaskPartsInteractorStyle(DefaultInteractorStyle): @@ -1907,7 +1907,7 @@ class SelectMaskPartsInteractorStyle(DefaultInteractorStyle):
1907 if self.dlg is None: 1907 if self.dlg is None:
1908 return 1908 return
1909 1909
1910 - dialog_return = self.dlg.button_clicked 1910 + dialog_return = self.dlg.GetReturnCode()
1911 1911
1912 if self.config.dlg_visible: 1912 if self.config.dlg_visible:
1913 self.config.dlg_visible = False 1913 self.config.dlg_visible = False
invesalius/gui/dialogs.py
@@ -2024,7 +2024,7 @@ class SelectPartsOptionsDialog(wx.Dialog): @@ -2024,7 +2024,7 @@ class SelectPartsOptionsDialog(wx.Dialog):
2024 2024
2025 self.config = config 2025 self.config = config
2026 2026
2027 - self.button_clicked = wx.CANCEL 2027 + self.SetReturnCode(wx.CANCEL)
2028 2028
2029 self._init_gui() 2029 self._init_gui()
2030 2030
@@ -2107,11 +2107,11 @@ class SelectPartsOptionsDialog(wx.Dialog): @@ -2107,11 +2107,11 @@ class SelectPartsOptionsDialog(wx.Dialog):
2107 self.Bind(wx.EVT_CLOSE, self.OnClose) 2107 self.Bind(wx.EVT_CLOSE, self.OnClose)
2108 2108
2109 def OnOk(self, evt): 2109 def OnOk(self, evt):
2110 - self.button_clicked = wx.OK 2110 + self.SetReturnCode(wx.OK)
2111 self.Close() 2111 self.Close()
2112 2112
2113 def OnCancel(self, evt): 2113 def OnCancel(self, evt):
2114 - self.button_clicked = wx.CANCEL 2114 + self.SetReturnCode(wx.CANCEL)
2115 self.Close() 2115 self.Close()
2116 2116
2117 def OnChar(self, evt): 2117 def OnChar(self, evt):