Skip to content

Commit

Permalink
Gradient Descent - fix pyqt6 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
PrimozGodec committed Apr 3, 2023
1 parent 03f8582 commit 2185930
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions orangecontrib/educational/widgets/owgradientdescent.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,12 +307,12 @@ def disable_controls(self, disabled):
self.restart_button, self.properties_box, self.options_box]:
item.setDisabled(disabled)

key_actions = {(0, Qt.Key_Space): step} # space button for step
key_actions = {(Qt.NoModifier, Qt.Key_Space): step} # space button for step

def keyPressEvent(self, e):
"""Bind 'back' key to step back"""
if (int(e.modifiers()), e.key()) in self.key_actions:
fun = self.key_actions[(int(e.modifiers()), e.key())]
if (e.modifiers(), e.key()) in self.key_actions:
fun = self.key_actions[(e.modifiers(), e.key())]
fun(self)
else:
super().keyPressEvent(e)
Expand Down

0 comments on commit 2185930

Please sign in to comment.