mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
IC: Implement copy/paste command.
This commit is contained in:
1 parent
c1f4aaf957
commit
459722610a
3 files changed
+85
-5
No files matched your search
@@ -266,6 +266,9 @@ class InitialConditions(SQLSubModel):
|
||||
def __len__(self):
|
||||
return len(self._data)
|
||||
|
||||
def lst(self):
|
||||
return self._data
|
||||
|
||||
@property
|
||||
def reach(self):
|
||||
return self._reach
|
||||
@@ -295,6 +298,15 @@ class InitialConditions(SQLSubModel):
|
||||
self._data.insert(index, n)
|
||||
self._status.modified()
|
||||
|
||||
def new_from_data(self, kp, discharge, elevation):
|
||||
n = Data(reach=self._reach, status=self._status)
|
||||
|
||||
n['kp'] = kp
|
||||
n['discharge'] = discharge
|
||||
n['elevation'] = elevation
|
||||
|
||||
return n
|
||||
|
||||
def insert(self, index, data):
|
||||
self._data.insert(index, data)
|
||||
self._status.modified()
|
||||
|
||||
Reference in new issue
Block a user