Skip to content

Commit

Permalink
[fix] Update open editor after swapping rows
Browse files Browse the repository at this point in the history
  • Loading branch information
Kastakin committed Jun 8, 2023
1 parent 5dfdddb commit 4a70434
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/python/pyes/commands/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ def __init__(self, table: QTableView, first_row: int, second_row: int):

def undo(self) -> None:
self.model.swapRows(self.second_row, self.first_row)
self.table.updateEditorData()
self.table.selectRow(self.first_row)

def redo(self) -> None:
self.model.swapRows(self.first_row, self.second_row)
self.table.updateEditorData()
self.table.selectRow(self.second_row)


Expand Down Expand Up @@ -188,7 +190,7 @@ def cleanup(self):
updateCompNames(
self.comp_model, *self.species_tables, self.conc_model, self.ind_comp
)

self.comp_table.updateEditorData()
self.ind_comp.setCurrentIndex(self.ind_comp.findData(self.prev_ind_comp, 0))


Expand Down

0 comments on commit 4a70434

Please sign in to comment.