BC: Fix delete elements.

This commit is contained in:
Pierre-Antoine Rouby committed 2023-05-03 11:28:13 +02:00
1 parent cd3d546d73
commit 500d97d7d3
3 files changed
+18 -8

No files matched your search

@@ -301,6 +301,10 @@ class BoundaryConditionWindow(ASubMainWindow, ListedSubWindow):
2, self._delegate_node
)
table.setSelectionBehavior(QAbstractItemView.SelectRows)
table.setAlternatingRowColors(True)
def setup_connections(self):
self.find(QAction, "action_add").triggered.connect(self.add)
self.find(QAction, "action_del").triggered.connect(self.delete)
@@ -339,6 +343,9 @@ class BoundaryConditionWindow(ASubMainWindow, ListedSubWindow):
def delete(self):
rows = self.index_selected_rows()
if len(rows) == 0:
return
self._table.delete(rows)
def sort(self):