From 2150d4498d50bb8610f34da8427af8d8f321031f Mon Sep 17 00:00:00 2001 From: Thiago Franco de Moraes Date: Mon, 22 Aug 2016 14:36:40 -0300 Subject: [PATCH] Better progress dialog messages --- invesalius/data/styles.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/invesalius/data/styles.py b/invesalius/data/styles.py index be5ce21..d22295b 100644 --- a/invesalius/data/styles.py +++ b/invesalius/data/styles.py @@ -1781,6 +1781,8 @@ class FloodFillMaskInteractorStyle(DefaultInteractorStyle): self.fill_value = 254 self._dlg_title = _(u"Fill holes") + self._progr_title = _(u"Fill hole") + self._progr_msg = _(u"Filling hole ...") self.AddObserver("LeftButtonPressEvent", self.OnFFClick) @@ -1839,7 +1841,6 @@ class FloodFillMaskInteractorStyle(DefaultInteractorStyle): bstruct = np.zeros((3, 3, 1), dtype='uint8') bstruct[:, :, 0] = _bstruct - print bstruct if self.config.target == '2D': floodfill.floodfill_threshold(mask, [[x, y, z]], self.t0, self.t1, self.fill_value, bstruct, mask) b_mask = self.viewer.slice_.buffer_slices[self.orientation].mask @@ -1857,7 +1858,7 @@ class FloodFillMaskInteractorStyle(DefaultInteractorStyle): with futures.ThreadPoolExecutor(max_workers=1) as executor: future = executor.submit(floodfill.floodfill_threshold, mask, [[x, y, z]], self.t0, self.t1, self.fill_value, bstruct, mask) - dlg = wx.ProgressDialog("Filling ...", "Doido", parent=None, style=wx.PD_APP_MODAL) + dlg = wx.ProgressDialog(self._progr_title, self._progr_msg, parent=None, style=wx.PD_APP_MODAL) while not future.done(): dlg.Pulse() time.sleep(0.1) @@ -1923,6 +1924,8 @@ class RemoveMaskPartsInteractorStyle(FloodFillMaskInteractorStyle): self.fill_value = 1 self._dlg_title = _(u"Remove parts") + self._progr_title = _(u"Remove part") + self._progr_msg = _(u"Removing part ...") def get_style(style): -- libgit2 0.21.2