Commit b1b684af authored by Matheus Müller's avatar Matheus Müller

Debugado. Operacional

parent 1f9dab0f
...@@ -275,6 +275,7 @@ def ewin_build(window, OFlabentries, mainwindow, calcbutton, distvar, modevar, L ...@@ -275,6 +275,7 @@ def ewin_build(window, OFlabentries, mainwindow, calcbutton, distvar, modevar, L
BUpdate['state']='disabled' BUpdate['state']='disabled'
for n in arange(0, len(Ebuttons)): for n in arange(0, len(Ebuttons)):
Ebuttons[n]['state'] = 'disabled' Ebuttons[n]['state'] = 'disabled'
distvar.set(0) # Foi preciso forcar isso pois o radiobutton nao o fazia
def changestate2(): def changestate2():
BLayer['state']='disabled' BLayer['state']='disabled'
...@@ -291,9 +292,10 @@ def ewin_build(window, OFlabentries, mainwindow, calcbutton, distvar, modevar, L ...@@ -291,9 +292,10 @@ def ewin_build(window, OFlabentries, mainwindow, calcbutton, distvar, modevar, L
BUpdate['state']='normal' BUpdate['state']='normal'
for n in arange(0, len(Ebuttons)): for n in arange(0, len(Ebuttons)):
Ebuttons[n]['state'] = 'normal' Ebuttons[n]['state'] = 'normal'
distvar.set(1) # Foi preciso forcar isso pois o radiobutton nao o fazia
def call_layers(): def call_layers():
layers() layers() # funcao de layers.py
# By Layers # By Layers
BLayer = tk.Button(Labeldist, text ='Open Layers', command = lambda i = int(Econtrol) : call_layers(), width=15) BLayer = tk.Button(Labeldist, text ='Open Layers', command = lambda i = int(Econtrol) : call_layers(), width=15)
...@@ -323,6 +325,7 @@ def ewin_build(window, OFlabentries, mainwindow, calcbutton, distvar, modevar, L ...@@ -323,6 +325,7 @@ def ewin_build(window, OFlabentries, mainwindow, calcbutton, distvar, modevar, L
butPTE['state'] = 'normal' butPTE['state'] = 'normal'
RLay['state'] = 'normal' RLay['state'] = 'normal'
Labentrys[12]['state'] = 'disabled' Labentrys[12]['state'] = 'disabled'
modevar.set(0) # Foi preciso forcar isso pois o radiobutton nao o fazia
def changemode2(): def changemode2():
RDra.invoke() RDra.invoke()
...@@ -333,6 +336,7 @@ def ewin_build(window, OFlabentries, mainwindow, calcbutton, distvar, modevar, L ...@@ -333,6 +336,7 @@ def ewin_build(window, OFlabentries, mainwindow, calcbutton, distvar, modevar, L
Labentrys[12]['state'] = 'normal' Labentrys[12]['state'] = 'normal'
for n in arange(1, len(Ebuttons)): for n in arange(1, len(Ebuttons)):
Ebuttons[n]['state'] = 'disabled' Ebuttons[n]['state'] = 'disabled'
modevar.set(1) # Foi preciso forcar isso pois o radiobutton nao o fazia
Rions = tk.Radiobutton(Labelframe, text="Ion Scattering", variable=modevar, value=0, width=18, command=lambda i=i :changemode()) Rions = tk.Radiobutton(Labelframe, text="Ion Scattering", variable=modevar, value=0, width=18, command=lambda i=i :changemode())
Rions.pack() Rions.pack()
......
No preview for this file type
...@@ -56,7 +56,7 @@ def init_calc(): ...@@ -56,7 +56,7 @@ def init_calc():
param['FWHM0'] = float(OFlabentries[13].get()) param['FWHM0'] = float(OFlabentries[13].get())
ionb['mass'] = float(OFlabentries[22].get()) ionb['mass'] = float(OFlabentries[22].get())
ionb['Z'] = float(OFlabentries[23].get()) ionb['Z'] = float(OFlabentries[23].get())
print distvar.get()
if int(modevar.get()) == 0: if int(modevar.get()) == 0:
if int(distvar.get()) == 1: if int(distvar.get()) == 1:
for i in range(len(Edict)): for i in range(len(Edict)):
...@@ -217,7 +217,9 @@ CalcButton.pack() ...@@ -217,7 +217,9 @@ CalcButton.pack()
# Elements callback # Elements callback
modevar = tk.IntVar() modevar = tk.IntVar()
modevar.set(0)
distvar = tk.IntVar() distvar = tk.IntVar()
distvar.set(1)
ewin_build(Label1, OFlabentries, root, CalcButton, distvar, modevar, Label0) ewin_build(Label1, OFlabentries, root, CalcButton, distvar, modevar, Label0)
############################################################################## ##############################################################################
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment