From b35d3e4e76ce4fad133316861f1962efd9b9184f Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Thu, 2 May 2019 19:20:02 +0200 Subject: Element edition window --- src/phys.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/phys.py') diff --git a/src/phys.py b/src/phys.py index 96f3bad..cf30667 100644 --- a/src/phys.py +++ b/src/phys.py @@ -53,12 +53,14 @@ class Ellipse: class Polarizer: def __init__(self, type, delta=0): + self.name = "New element" # FIXME self.type = type self.angle = 0 self.delta = delta - self.ref = False # FIXME: move this to UI or System + self.ref = False self.t1 = 1 self.t2 = 0 + self.enable = True self.set_type(type) def set_type(self, type): @@ -92,7 +94,6 @@ class Polarizer: class System: def __init__(self): self.elements = list() - self.ignore = list() def recalculate(system): system.states = [None] * len(system.elements) @@ -100,7 +101,7 @@ class System: state = None for i, pol in enumerate(system.elements): - if i >= len(system.ignore) or not system.ignore[i]: + if pol.enable: state = pol.mul(state) system.states[i] = state system.ellipses.append(Ellipse(state)) -- cgit