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
@@ -152,11 +152,29 @@ class EditBoundaryConditionWindow(ASubMainWindow, ListedSubWindow):
|
||||
|
||||
|
||||
def copy(self):
|
||||
print("TODO")
|
||||
self.plot.update()
|
||||
rows = self.index_selected_rows()
|
||||
|
||||
table = []
|
||||
table.append(self._data.header)
|
||||
|
||||
data = self._data.data
|
||||
for row in rows:
|
||||
table.append(list(data[row]))
|
||||
|
||||
self.copyTableIntoClipboard(table)
|
||||
|
||||
def paste(self):
|
||||
print("TODO")
|
||||
header, data = self.parseClipboardTable()
|
||||
|
||||
if len(data) == 0:
|
||||
return
|
||||
|
||||
row = 0
|
||||
rows = self.index_selected_rows()
|
||||
if len(rows) != 0:
|
||||
row = rows[0]
|
||||
|
||||
self._table.paste(row, header, data)
|
||||
self.plot.update()
|
||||
|
||||
def undo(self):
|
||||
|
||||
Reference in new issue
Block a user