Skip to content

Commit 161e3ba

Browse files
committed
Fix selection model
There is selectionModel available before the main model for the view is set.
1 parent 1b4b689 commit 161e3ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arho_feature_template/gui/load_plan_dialog.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ def __init__(self, parent, connections):
5656

5757
self.planTableView.setSelectionMode(QTableView.SingleSelection)
5858
self.planTableView.setSelectionBehavior(QTableView.SelectRows)
59-
self.planTableView.selectionModel().selectionChanged.connect(self.on_selection_changed)
6059

6160
self.model = QStandardItemModel()
6261
self.model.setColumnCount(5)
@@ -75,6 +74,7 @@ def __init__(self, parent, connections):
7574
self.filterProxyModel.setFilterCaseSensitivity(Qt.CaseInsensitive)
7675

7776
self.planTableView.setModel(self.filterProxyModel)
77+
self.planTableView.selectionModel().selectionChanged.connect(self.on_selection_changed)
7878

7979
def load_plans(self):
8080
self.model.removeRows(0, self.model.rowCount())

0 commit comments

Comments
 (0)