BC: Edit: Add paste feature.

This commit is contained in:
Pierre-Antoine Rouby committed 2023-05-04 15:18:42 +02:00
1 parent f8355021e7
commit fff5668afe
4 files changed
+66 -8

No files matched your search

+21 -3
View File
@@ -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):