summaryrefslogtreecommitdiff
path: root/src/ui_table.py
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2019-05-03 16:31:32 +0200
committerPaweł Redman <pawel.redman@gmail.com>2019-05-03 16:31:32 +0200
commit43da01a538a5c6724505026b4a84b559d5e56219 (patch)
treeb778fab589c30882a769011b23da22e2a434df3f /src/ui_table.py
parentea83137c32be2f7c47e6c4e4bbfaafeb0591db21 (diff)
More ui refactoring
Diffstat (limited to 'src/ui_table.py')
-rw-r--r--src/ui_table.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ui_table.py b/src/ui_table.py
index 08b99f3..7640ace 100644
--- a/src/ui_table.py
+++ b/src/ui_table.py
@@ -163,7 +163,7 @@ class SystemTableRow:
def __init__(self, parent, pol, row_number):
self.parent = parent
self.pol = pol
- pol.row = self
+ self.row_number = row_number
self.angle = pol.angle
self.delta = pol.delta
@@ -211,6 +211,10 @@ class SystemTable(QTableWidget):
self.vh = self.verticalHeader()
self.vh.setSectionResizeMode(QHeaderView.ResizeToContents)
+ def renumber_rows(self):
+ for i, row in enumerate(self.rows):
+ row.row_number = i
+
def populate(self, system):
self.system = system