From 0eb985ed16713cc8f3c3b48970e545995b2af8eb Mon Sep 17 00:00:00 2001 From: tatiana Date: Wed, 3 Feb 2010 13:31:03 +0000 Subject: [PATCH] ENH: Inserted new mask dialog into appropriate module --- invesalius/gui/dialogs.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+), 0 deletions(-) diff --git a/invesalius/gui/dialogs.py b/invesalius/gui/dialogs.py index b2c0637..b54bc1d 100644 --- a/invesalius/gui/dialogs.py +++ b/invesalius/gui/dialogs.py @@ -336,6 +336,26 @@ def MaskSelectionRequiredForDuplication(): dlg.ShowModal() dlg.Destroy() + +def NewMask(): + import data.mask as mask + dlg = wx.TextEntryDialog(None, _('Name of new mask:'), + _('InVesalius 3 - New mask')) + + dlg.CenterOnScreen() + default_mask_name = const.MASK_NAME_PATTERN %(mask.Mask.general_index+2) + dlg.SetValue(default_mask_name) + + try: + op = dlg.ShowModal() == wx.ID_OK + except(wx._core.PyAssertionError): + print "win64 - wx._core.PyAssertionError" + op = True + + if op: + return dlg.GetValue() + return None + def InexistentPath(path): msg = _("%s does not exist.")%(path) if sys.platform == 'darwin': -- libgit2 0.21.2