Skip to content

Commit

Permalink
correct
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey Marchenko committed Feb 19, 2024
1 parent 18e3fa5 commit 474799c
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions sportorg/gui/tabs/persons.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,7 @@ def keyPressEvent(self, e):
def move_rows(self):
selected_indexes = self.person_table.selectionModel().selectedRows()
if len(selected_indexes) == 2:
from_index = -1
to_index = -1
for index in selected_indexes:
if from_index == -1:
from_index = index.row()
else:
to_index = index.row()

self.person_table.model().move_rows(from_index, to_index)
self.person_table.model().move_rows(selected_indexes[0].row(), selected_indexes[1].row())

def setup_ui(self):
self.person_table.setObjectName('PersonTable')
Expand Down

0 comments on commit 474799c

Please sign in to comment.