diff options
-rw-r--r-- | Graphics.py | 6 | ||||
-rw-r--r-- | Streams.py | 1 | ||||
-rw-r--r-- | Undo.dat | bin | 45270 -> 49977 bytes | |||
-rw-r--r-- | UnitOperations.py | 1 | ||||
-rw-r--r-- | mainApp.py | 1 |
5 files changed, 6 insertions, 3 deletions
diff --git a/Graphics.py b/Graphics.py index f6b17b5..a653d7d 100644 --- a/Graphics.py +++ b/Graphics.py @@ -420,19 +420,19 @@ class NodeItem(QtWidgets.QGraphicsItem): self.nin = self.obj.no_of_inputs self.nop = self.obj.no_of_outputs - if self.obj.type == 'Mixer': + if self.obj.type == 'Mixer' and not self.obj.saved: text, ok = QInputDialog.getText(self.container.graphicsView, 'Mixer', 'Enter number of input:') if ok and text: self.nin = int(text) self.obj.no_of_inputs = self.nin self.obj.variables['NI']['value'] = self.nin - elif self.obj.type == 'Splitter': + elif self.obj.type == 'Splitter' and not self.obj.saved: text, ok = QInputDialog.getText(self.container.graphicsView, 'Splitter', 'Enter number of output:') if ok and text: self.nop = int(text) self.obj.no_of_outputs = self.nop self.obj.variables['No']['value'] = self.nop - elif self.obj.type == 'DistillationColumn': + elif self.obj.type == 'DistillationColumn'and not self.obj.saved: text, ok = QInputDialog.getText(self.container.graphicsView, 'DistillationColumn', 'Enter number of input:') if ok and text: self.nin = int(text) @@ -28,6 +28,7 @@ class MaterialStream(): self.start_dict = {} self.eqn_dict = {} self.modes_list = ["PT","PH","PVF","TVF","PS"] + self.saved = False self.variables = { 'P' : {'name':'Pressure', 'value':101325, 'unit':'Pa'}, Binary files differdiff --git a/UnitOperations.py b/UnitOperations.py index c868730..1a96e59 100644 --- a/UnitOperations.py +++ b/UnitOperations.py @@ -30,6 +30,7 @@ class UnitOperation(): self.multidict = [] self.thermo_pack_req = False self.thermo_package = 'RaoultsLaw' + self.saved = False def param_getter(self,mode=None): params = {} @@ -299,6 +299,7 @@ class MainApp(QMainWindow,ui): data = [] for i in self.container.unit_operations: data.append(i) + i.saved = True print(i.pos) data.append(compound_selected) print(data) |