Commit 2150d4498d50bb8610f34da8427af8d8f321031f

Authored by Thiago Franco de Moraes
1 parent 47d41bbc
Exists in ff_mask_improv

Better progress dialog messages

Showing 1 changed file with 5 additions and 2 deletions   Show diff stats
invesalius/data/styles.py
... ... @@ -1781,6 +1781,8 @@ class FloodFillMaskInteractorStyle(DefaultInteractorStyle):
1781 1781 self.fill_value = 254
1782 1782  
1783 1783 self._dlg_title = _(u"Fill holes")
  1784 + self._progr_title = _(u"Fill hole")
  1785 + self._progr_msg = _(u"Filling hole ...")
1784 1786  
1785 1787 self.AddObserver("LeftButtonPressEvent", self.OnFFClick)
1786 1788  
... ... @@ -1839,7 +1841,6 @@ class FloodFillMaskInteractorStyle(DefaultInteractorStyle):
1839 1841 bstruct = np.zeros((3, 3, 1), dtype='uint8')
1840 1842 bstruct[:, :, 0] = _bstruct
1841 1843  
1842   - print bstruct
1843 1844 if self.config.target == '2D':
1844 1845 floodfill.floodfill_threshold(mask, [[x, y, z]], self.t0, self.t1, self.fill_value, bstruct, mask)
1845 1846 b_mask = self.viewer.slice_.buffer_slices[self.orientation].mask
... ... @@ -1857,7 +1858,7 @@ class FloodFillMaskInteractorStyle(DefaultInteractorStyle):
1857 1858 with futures.ThreadPoolExecutor(max_workers=1) as executor:
1858 1859 future = executor.submit(floodfill.floodfill_threshold, mask, [[x, y, z]], self.t0, self.t1, self.fill_value, bstruct, mask)
1859 1860  
1860   - dlg = wx.ProgressDialog("Filling ...", "Doido", parent=None, style=wx.PD_APP_MODAL)
  1861 + dlg = wx.ProgressDialog(self._progr_title, self._progr_msg, parent=None, style=wx.PD_APP_MODAL)
1861 1862 while not future.done():
1862 1863 dlg.Pulse()
1863 1864 time.sleep(0.1)
... ... @@ -1923,6 +1924,8 @@ class RemoveMaskPartsInteractorStyle(FloodFillMaskInteractorStyle):
1923 1924 self.fill_value = 1
1924 1925  
1925 1926 self._dlg_title = _(u"Remove parts")
  1927 + self._progr_title = _(u"Remove part")
  1928 + self._progr_msg = _(u"Removing part ...")
1926 1929  
1927 1930  
1928 1931 def get_style(style):
... ...