mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
BC: Edit: Add paste feature.
This commit is contained in:
1 parent
f8355021e7
commit
fff5668afe
4 files changed
+66
-8
No files matched your search
@@ -65,6 +65,24 @@ class BoundaryCondition(object):
|
||||
def is_define(self):
|
||||
return self._data is not None
|
||||
|
||||
def new_from_data(self, header, data):
|
||||
new_0 = self._default_0
|
||||
new_1 = self._default_1
|
||||
|
||||
if len(header) != 0:
|
||||
for i in [0,1]:
|
||||
for j in range(len(header)):
|
||||
if self._header[i] == header[j]:
|
||||
if i == 0:
|
||||
new_0 = self._types[i](data[j])
|
||||
else:
|
||||
new_1 = self._types[i](data[j])
|
||||
else:
|
||||
new_0 = self._types[0](data[0])
|
||||
new_1 = self._types[1](data[1])
|
||||
|
||||
return (new_0, new_1)
|
||||
|
||||
def add(self, index:int):
|
||||
value = (self._default_0, self._default_1)
|
||||
self._data.insert(index, value)
|
||||
|
||||
Reference in new issue
Block a user