- Resolved potential error involved with closing stuff and addressing it
later.
This commit is contained in:
parent
3a2505dd18
commit
c2caa0da8a
@ -34,7 +34,7 @@ class MainWindow(wx.Frame):
|
|||||||
self.opts = opts
|
self.opts = opts
|
||||||
self.args = args
|
self.args = args
|
||||||
|
|
||||||
self.dirname = '.'
|
self.dirname = os.path.abspath('.')
|
||||||
|
|
||||||
self.filename = 'noname.spdl'
|
self.filename = 'noname.spdl'
|
||||||
self.load = False
|
self.load = False
|
||||||
@ -265,7 +265,6 @@ class SettingsWindow(wx.Panel):
|
|||||||
|
|
||||||
self.win = daddy
|
self.win = daddy
|
||||||
|
|
||||||
|
|
||||||
# Bound on the number of runs
|
# Bound on the number of runs
|
||||||
self.maxruns = int(Preference.get('maxruns','5'))
|
self.maxruns = int(Preference.get('maxruns','5'))
|
||||||
r1 = wx.StaticText(self,-1,"Maximum number of runs (0 disables bound)")
|
r1 = wx.StaticText(self,-1,"Maximum number of runs (0 disables bound)")
|
||||||
|
@ -426,6 +426,7 @@ class ScytherRun(object):
|
|||||||
self.resultwin = resultwin = ResultWindow(self,mainwin,title)
|
self.resultwin = resultwin = ResultWindow(self,mainwin,title)
|
||||||
|
|
||||||
def attackDone(attack,total,done):
|
def attackDone(attack,total,done):
|
||||||
|
if resultwin:
|
||||||
if done < total:
|
if done < total:
|
||||||
txt = "Generating attack graphs (%i of %i done)." % (done,total)
|
txt = "Generating attack graphs (%i of %i done)." % (done,total)
|
||||||
else:
|
else:
|
||||||
@ -434,11 +435,13 @@ class ScytherRun(object):
|
|||||||
resultwin.Refresh()
|
resultwin.Refresh()
|
||||||
|
|
||||||
def claimDone(claim):
|
def claimDone(claim):
|
||||||
|
if resultwin:
|
||||||
if claim.button and len(claim.attacks) > 0:
|
if claim.button and len(claim.attacks) > 0:
|
||||||
claim.button.Enable()
|
claim.button.Enable()
|
||||||
#resultwin.Refresh()
|
#resultwin.Refresh()
|
||||||
|
|
||||||
def allDone():
|
def allDone():
|
||||||
|
if resultwin:
|
||||||
resultwin.SetCursor(wx.StockCursor(wx.CURSOR_ARROW))
|
resultwin.SetCursor(wx.StockCursor(wx.CURSOR_ARROW))
|
||||||
|
|
||||||
resultwin.Center()
|
resultwin.Center()
|
||||||
|
Loading…
Reference in New Issue
Block a user