Skip to content

Commit

Permalink
fix(AbstractItemView): fix some setfocus stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
phil65 committed May 10, 2023
1 parent 80e7c0c commit 748ecd4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions prettyqt/widgets/abstractitemview.py
Expand Up @@ -174,7 +174,7 @@ def move_row_selection(self, dx: int) -> None:
for row in self.selected_rows():
new_idx = self.model().index(row + dx, 0)
if new_idx.isValid():
self.select_index(new_idx, expand="rows")
self.set_current_index(new_idx, current=True, expand="rows")

def set_delegate(
self,
Expand Down Expand Up @@ -421,7 +421,7 @@ def select_last_row(self):

def select_first_row(self):
idx = self.model().index(0, 0)
self.setCurrentIndex(idx)
self.set_current_index(idx, current=True, expand="rows")

def scroll_to(
self, index: QtCore.QModelIndex, mode: ScrollHintStr = "ensure_visible"
Expand Down

0 comments on commit 748ecd4

Please sign in to comment.