From ea83137c32be2f7c47e6c4e4bbfaafeb0591db21 Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Fri, 3 May 2019 15:56:04 +0200 Subject: Bring back basic functionality --- src/ui.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/ui.py') diff --git a/src/ui.py b/src/ui.py index fb0932a..77f36fc 100644 --- a/src/ui.py +++ b/src/ui.py @@ -41,7 +41,7 @@ from ui_table import * def update(): for i, pol in enumerate(system.elements): - row = GUI.table_rows[i] + row = GUI.table.rows[i] if pol.ref is not False: pol.angle += system.elements[pol.ref].angle @@ -50,7 +50,7 @@ def update(): I = 1 for i, pol in enumerate(system.elements): - row = GUI.table_rows[i] + row = GUI.table.rows[i] # update all the diagrams row.ellipse.state = system.states[i] @@ -91,6 +91,8 @@ def update(): #if GUI.auto_optimize.isChecked(): # optimize() +GUI.do_update = update + def half_assed_element_creation(index=None): pol = phys.Polarizer("linear") @@ -312,8 +314,7 @@ class MainWindow(QMainWindow): rhs.addWidget(GUI.widok) GUI.table.populate(system) - - #update() + update() def change_input_intensity(self): try: -- cgit