From f14f47b92b2390c947cd9c146ecbd0891341942e Mon Sep 17 00:00:00 2001 From: Paulo Henrique Junqueira Amorim Date: Mon, 1 Jun 2015 09:50:06 -0300 Subject: [PATCH] FIX: Fixed problem with update mask in delete and run boolean operations --- invesalius/data/viewer_slice.py | 6 ++++++ invesalius/gui/data_notebook.py | 3 ++- invesalius/gui/dialogs.py | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/invesalius/data/viewer_slice.py b/invesalius/data/viewer_slice.py index 2297a5c..a2ade53 100755 --- a/invesalius/data/viewer_slice.py +++ b/invesalius/data/viewer_slice.py @@ -717,6 +717,12 @@ class Viewer(wx.Panel): Publisher.subscribe(self.OnSetOverwriteMask, "Set overwrite mask") + Publisher.subscribe(self.RefreshViewer, "Refresh viewer") + + + def RefreshViewer(self, pubsub_evt): + self.Refresh() + def SetDefaultCursor(self, pusub_evt): self.interactor.SetCursor(wx.StockCursor(wx.CURSOR_DEFAULT)) diff --git a/invesalius/gui/data_notebook.py b/invesalius/gui/data_notebook.py index 60db810..31f9de3 100644 --- a/invesalius/gui/data_notebook.py +++ b/invesalius/gui/data_notebook.py @@ -404,8 +404,9 @@ class MasksListCtrlPanel(wx.ListCtrl, listmix.TextEditMixin): if new_dict: if index == self.current_index: self.SetItemImage(0, 1) - Publisher.sendMessage('Show mask', (0, 1)) Publisher.sendMessage('Change mask selected', 0) + Publisher.sendMessage('Show mask', (0, 1)) + Publisher.sendMessage('Refresh viewer') for key in new_dict: if key: self.SetItemImage(key, 0) diff --git a/invesalius/gui/dialogs.py b/invesalius/gui/dialogs.py index 9a605a4..df7c170 100644 --- a/invesalius/gui/dialogs.py +++ b/invesalius/gui/dialogs.py @@ -1561,6 +1561,7 @@ class MaskBooleanDialog(wx.Dialog): Publisher.sendMessage('Do boolean operation', (op, m1, m2)) Publisher.sendMessage('Reload actual slice') + Publisher.sendMessage('Refresh viewer') self.Close() self.Destroy() -- libgit2 0.21.2