Skip to content

Commit

Permalink
Fix next prev button in multiStepWidget (#151)
Browse files Browse the repository at this point in the history
  • Loading branch information
DanicaSTFC authored Jul 18, 2024
1 parent 5856dff commit 1a182f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Version x.x.x
- Edit next and prev in UIMultiStepWidget #151
- Remove question mark from form dialog (#150)

# Version 1.0.0
Expand Down
4 changes: 2 additions & 2 deletions eqt/ui/UIMultiStepWidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ def updateStep(self, go_to="next"):
if go_to == 'next':
self.prev_button.setEnabled(True)
next_index = current_step_index + 1
self.next_button.setEnabled(next_index == len(steps) - 1)
self.next_button.setEnabled(next_index != len(steps) - 1)
elif go_to == 'prev':
self.next_button.setEnabled(True)
next_index = current_step_index - 1
self.prev_button.setEnabled(next_index == 0)
self.prev_button.setEnabled(next_index != 0)

self.current_step = steps[next_index]

Expand Down

0 comments on commit 1a182f7

Please sign in to comment.