summaryrefslogtreecommitdiff
path: root/Streams.py
diff options
context:
space:
mode:
Diffstat (limited to 'Streams.py')
-rw-r--r--Streams.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/Streams.py b/Streams.py
index fb0905d..ed35261 100644
--- a/Streams.py
+++ b/Streams.py
@@ -1,6 +1,7 @@
import json
import sys
from PyQt5.QtCore import *
+from ComponentSelector import compound_selected
class MaterialStream():
counter = 1
@@ -56,6 +57,9 @@ class MaterialStream():
}
self.init_variables()
+ def update_compounds(self):
+ self.compound_names = compound_selected
+
def init_variables(self):
Nc = len(self.compound_names)
for i, val in enumerate(self.compound_names):
@@ -82,7 +86,10 @@ class MaterialStream():
temp = []
for i, val in enumerate(self.compound_names):
- temp.append(self.variables['x_pc[1,' + str(i+1) + ']']['value'])
+ try:
+ temp.append(self.variables['x_pc[1,' + str(i+1) + ']']['value'])
+ except:
+ pass
self.variables['x_pc']['value'] = temp
if(mode=="PT"):