diff --git a/invesalius/data/styles.py b/invesalius/data/styles.py index e81aaed..7739df6 100644 --- a/invesalius/data/styles.py +++ b/invesalius/data/styles.py @@ -1907,7 +1907,7 @@ class SelectMaskPartsInteractorStyle(DefaultInteractorStyle): if self.dlg is None: return - dialog_return = self.dlg.button_clicked + dialog_return = self.dlg.GetReturnCode() if self.config.dlg_visible: self.config.dlg_visible = False diff --git a/invesalius/gui/dialogs.py b/invesalius/gui/dialogs.py index 33c9c6c..04a264b 100644 --- a/invesalius/gui/dialogs.py +++ b/invesalius/gui/dialogs.py @@ -2024,7 +2024,7 @@ class SelectPartsOptionsDialog(wx.Dialog): self.config = config - self.button_clicked = wx.CANCEL + self.SetReturnCode(wx.CANCEL) self._init_gui() @@ -2107,11 +2107,11 @@ class SelectPartsOptionsDialog(wx.Dialog): self.Bind(wx.EVT_CLOSE, self.OnClose) def OnOk(self, evt): - self.button_clicked = wx.OK + self.SetReturnCode(wx.OK) self.Close() def OnCancel(self, evt): - self.button_clicked = wx.CANCEL + self.SetReturnCode(wx.CANCEL) self.Close() def OnChar(self, evt): -- libgit2 0.21.2