Commit 8ca8a4ea73b7328695be84dc2356c82bd51e51a4
1 parent
f447a151
Exists in
ff_mask
Better gui
Showing
3 changed files
with
8 additions
and
4 deletions
Show diff stats
invesalius/data/styles.py
@@ -1778,12 +1778,14 @@ class FloodFillMaskInteractorStyle(DefaultInteractorStyle): | @@ -1778,12 +1778,14 @@ class FloodFillMaskInteractorStyle(DefaultInteractorStyle): | ||
1778 | self.t1 = 1 | 1778 | self.t1 = 1 |
1779 | self.fill_value = 254 | 1779 | self.fill_value = 254 |
1780 | 1780 | ||
1781 | + self._dlg_title = _(u"Fill holes") | ||
1782 | + | ||
1781 | self.AddObserver("LeftButtonPressEvent", self.OnFFClick) | 1783 | self.AddObserver("LeftButtonPressEvent", self.OnFFClick) |
1782 | 1784 | ||
1783 | def SetUp(self): | 1785 | def SetUp(self): |
1784 | if not self.config.dlg_visible: | 1786 | if not self.config.dlg_visible: |
1785 | self.config.dlg_visible = True | 1787 | self.config.dlg_visible = True |
1786 | - self.dlg_ffill = dialogs.FFillOptionsDialog(self.config) | 1788 | + self.dlg_ffill = dialogs.FFillOptionsDialog(self._dlg_title, self.config) |
1787 | self.dlg_ffill.Show() | 1789 | self.dlg_ffill.Show() |
1788 | 1790 | ||
1789 | def CleanUp(self): | 1791 | def CleanUp(self): |
@@ -1909,6 +1911,8 @@ class RemoveMaskPartsInteractorStyle(FloodFillMaskInteractorStyle): | @@ -1909,6 +1911,8 @@ class RemoveMaskPartsInteractorStyle(FloodFillMaskInteractorStyle): | ||
1909 | self.t1 = 255 | 1911 | self.t1 = 255 |
1910 | self.fill_value = 1 | 1912 | self.fill_value = 1 |
1911 | 1913 | ||
1914 | + self._dlg_title = _(u"Remove parts") | ||
1915 | + | ||
1912 | 1916 | ||
1913 | def get_style(style): | 1917 | def get_style(style): |
1914 | STYLES = { | 1918 | STYLES = { |
invesalius/gui/dialogs.py
@@ -1841,9 +1841,9 @@ def BitmapNotSameSize(): | @@ -1841,9 +1841,9 @@ def BitmapNotSameSize(): | ||
1841 | 1841 | ||
1842 | 1842 | ||
1843 | class FFillOptionsDialog(wx.Dialog): | 1843 | class FFillOptionsDialog(wx.Dialog): |
1844 | - def __init__(self, config): | 1844 | + def __init__(self, title, config): |
1845 | pre = wx.PreDialog() | 1845 | pre = wx.PreDialog() |
1846 | - pre.Create(wx.GetApp().GetTopWindow(), -1, _(u'Floodfill options'), style=wx.DEFAULT_DIALOG_STYLE|wx.FRAME_FLOAT_ON_PARENT) | 1846 | + pre.Create(wx.GetApp().GetTopWindow(), -1, title, style=wx.DEFAULT_DIALOG_STYLE|wx.FRAME_FLOAT_ON_PARENT) |
1847 | self.PostCreate(pre) | 1847 | self.PostCreate(pre) |
1848 | 1848 | ||
1849 | self.config = config | 1849 | self.config = config |
invesalius/gui/frame.py
@@ -703,7 +703,7 @@ class MenuBar(wx.MenuBar): | @@ -703,7 +703,7 @@ class MenuBar(wx.MenuBar): | ||
703 | self.clean_mask_menu = mask_menu.Append(const.ID_CLEAN_MASK, _(u"Clean Mask\tCtrl+Shift+A")) | 703 | self.clean_mask_menu = mask_menu.Append(const.ID_CLEAN_MASK, _(u"Clean Mask\tCtrl+Shift+A")) |
704 | self.clean_mask_menu.Enable(False) | 704 | self.clean_mask_menu.Enable(False) |
705 | 705 | ||
706 | - self.fill_hole_mask_menu = mask_menu.Append(const.ID_FLOODFILL_MASK, _(u"Fill mask holes manually")) | 706 | + self.fill_hole_mask_menu = mask_menu.Append(const.ID_FLOODFILL_MASK, _(u"Fill holes manually")) |
707 | self.fill_hole_mask_menu.Enable(False) | 707 | self.fill_hole_mask_menu.Enable(False) |
708 | 708 | ||
709 | self.remove_mask_part_menu = mask_menu.Append(const.ID_REMOVE_MASK_PART, _(u"Remove parts")) | 709 | self.remove_mask_part_menu = mask_menu.Append(const.ID_REMOVE_MASK_PART, _(u"Remove parts")) |