diff --git a/invesalius/gui/data_notebook.py b/invesalius/gui/data_notebook.py index b91cdc3..eff129a 100644 --- a/invesalius/gui/data_notebook.py +++ b/invesalius/gui/data_notebook.py @@ -322,6 +322,7 @@ class ButtonControlPanel(wx.Panel): if mask_name: Publisher.sendMessage('Create new mask', (mask_name, thresh, colour)) + dialog.Destroy() def OnRemove(self): self.parent.listctrl.RemoveMasks() @@ -641,7 +642,7 @@ class SurfaceButtonControlPanel(wx.Panel): surface_options = dialog.GetValue() Publisher.sendMessage('Create surface from index', surface_options) - dialog.Destroy() + dialog.Destroy() def OnRemove(self): self.parent.listctrl.RemoveSurfaces() diff --git a/invesalius/gui/task_slice.py b/invesalius/gui/task_slice.py index 0a860bf..78be93b 100644 --- a/invesalius/gui/task_slice.py +++ b/invesalius/gui/task_slice.py @@ -153,22 +153,22 @@ class InnerTaskPanel(wx.Panel): if dlgs.ShowModal() == wx.ID_OK: algorithm = dlgs.GetAlgorithmSelected() options = dlgs.GetOptions() - else: - return - - mask_index = sl.current_mask.index - method = {'algorithm': algorithm, - 'options': options} - srf_options = {"index": mask_index, - "name": '', - "quality": _('Optimal *'), - "fill": False, - "keep_largest": False, - "overwrite": overwrite} - - Publisher.sendMessage('Create surface from index', - {'method': method, 'options': srf_options}) - Publisher.sendMessage('Fold surface task') + + mask_index = sl.current_mask.index + method = {'algorithm': algorithm, + 'options': options} + srf_options = {"index": mask_index, + "name": '', + "quality": _('Optimal *'), + "fill": False, + "keep_largest": False, + "overwrite": overwrite} + + Publisher.sendMessage('Create surface from index', + {'method': method, 'options': srf_options}) + Publisher.sendMessage('Fold surface task') + dlgs.Destroy() + else: dlg.InexistentMask() @@ -188,6 +188,7 @@ class InnerTaskPanel(wx.Panel): if mask_name: Publisher.sendMessage('Create new mask', (mask_name, thresh, colour)) + dialog.Destroy() def GetMaskSelected(self): return self.fold_panel.GetMaskSelected() diff --git a/invesalius/gui/task_surface.py b/invesalius/gui/task_surface.py index e77d313..354314f 100644 --- a/invesalius/gui/task_surface.py +++ b/invesalius/gui/task_surface.py @@ -168,7 +168,7 @@ class InnerTaskPanel(wx.Panel): surface_options = dialog.GetValue() Publisher.sendMessage('Create surface from index', surface_options) - dialog.Destroy() + dialog.Destroy() if evt: evt.Skip() -- libgit2 0.21.2