Example #1
0
    def OnLinkNewMask(self, evt=None):

        try:
            evt.data
            evt = None
        except:
            pass

        dialog = dlg.NewMask()

        try:
            if dialog.ShowModal() == wx.ID_OK:
                ok = 1
            else:
                ok = 0
        except (wx._core.PyAssertionError):  #TODO FIX: win64
            ok = 1

        if ok:
            mask_name, thresh, colour = dialog.GetValue()
            if mask_name:
                Publisher.sendMessage('Create new mask',
                                      mask_name=mask_name,
                                      thresh=thresh,
                                      colour=colour)
        dialog.Destroy()
Example #2
0
    def OnNew(self):
        dialog = dlg.NewMask()

        try:
            if dialog.ShowModal() == wx.ID_OK:
                ok = 1
            else:
                ok = 0
        except (wx._core.PyAssertionError):  #TODO FIX: win64
            ok = 1

        if ok:
            mask_name, thresh, colour = dialog.GetValue()
            if mask_name:
                Publisher.sendMessage('Create new mask',
                                      (mask_name, thresh, colour))
        dialog.Destroy()