Commit 5bbbf9541cc47b159d5d3de16f860ed52be1d98b
1 parent
4d0b9af2
Exists in
master
and in
3 other branches
fix the problem of invesalius not shutdown when closed
Showing
3 changed files
with
20 additions
and
18 deletions
Show diff stats
invesalius/gui/data_notebook.py
| ... | ... | @@ -322,6 +322,7 @@ class ButtonControlPanel(wx.Panel): |
| 322 | 322 | if mask_name: |
| 323 | 323 | Publisher.sendMessage('Create new mask', |
| 324 | 324 | (mask_name, thresh, colour)) |
| 325 | + dialog.Destroy() | |
| 325 | 326 | |
| 326 | 327 | def OnRemove(self): |
| 327 | 328 | self.parent.listctrl.RemoveMasks() |
| ... | ... | @@ -641,7 +642,7 @@ class SurfaceButtonControlPanel(wx.Panel): |
| 641 | 642 | surface_options = dialog.GetValue() |
| 642 | 643 | |
| 643 | 644 | Publisher.sendMessage('Create surface from index', surface_options) |
| 644 | - dialog.Destroy() | |
| 645 | + dialog.Destroy() | |
| 645 | 646 | |
| 646 | 647 | def OnRemove(self): |
| 647 | 648 | self.parent.listctrl.RemoveSurfaces() | ... | ... |
invesalius/gui/task_slice.py
| ... | ... | @@ -153,22 +153,22 @@ class InnerTaskPanel(wx.Panel): |
| 153 | 153 | if dlgs.ShowModal() == wx.ID_OK: |
| 154 | 154 | algorithm = dlgs.GetAlgorithmSelected() |
| 155 | 155 | options = dlgs.GetOptions() |
| 156 | - else: | |
| 157 | - return | |
| 158 | - | |
| 159 | - mask_index = sl.current_mask.index | |
| 160 | - method = {'algorithm': algorithm, | |
| 161 | - 'options': options} | |
| 162 | - srf_options = {"index": mask_index, | |
| 163 | - "name": '', | |
| 164 | - "quality": _('Optimal *'), | |
| 165 | - "fill": False, | |
| 166 | - "keep_largest": False, | |
| 167 | - "overwrite": overwrite} | |
| 168 | - | |
| 169 | - Publisher.sendMessage('Create surface from index', | |
| 170 | - {'method': method, 'options': srf_options}) | |
| 171 | - Publisher.sendMessage('Fold surface task') | |
| 156 | + | |
| 157 | + mask_index = sl.current_mask.index | |
| 158 | + method = {'algorithm': algorithm, | |
| 159 | + 'options': options} | |
| 160 | + srf_options = {"index": mask_index, | |
| 161 | + "name": '', | |
| 162 | + "quality": _('Optimal *'), | |
| 163 | + "fill": False, | |
| 164 | + "keep_largest": False, | |
| 165 | + "overwrite": overwrite} | |
| 166 | + | |
| 167 | + Publisher.sendMessage('Create surface from index', | |
| 168 | + {'method': method, 'options': srf_options}) | |
| 169 | + Publisher.sendMessage('Fold surface task') | |
| 170 | + dlgs.Destroy() | |
| 171 | + | |
| 172 | 172 | else: |
| 173 | 173 | dlg.InexistentMask() |
| 174 | 174 | |
| ... | ... | @@ -188,6 +188,7 @@ class InnerTaskPanel(wx.Panel): |
| 188 | 188 | if mask_name: |
| 189 | 189 | Publisher.sendMessage('Create new mask', |
| 190 | 190 | (mask_name, thresh, colour)) |
| 191 | + dialog.Destroy() | |
| 191 | 192 | |
| 192 | 193 | def GetMaskSelected(self): |
| 193 | 194 | return self.fold_panel.GetMaskSelected() | ... | ... |
invesalius/gui/task_surface.py