Skip to content

Commit

Permalink
get current keyframe goals only once
Browse files Browse the repository at this point in the history
  • Loading branch information
Pär committed Nov 22, 2024
1 parent e8a89dd commit 87804d7
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -661,14 +661,13 @@ def frame_select(self):
if selected_frame is not None:
# check if unrecorded changes would be lost
unrecorded_changes = []
current_keyframe_goals = self._recorder.get_keyframe(self._selected_frame)["goals"]

for motor_name, text_field in self._motor_controller_text_fields.items():
# Get the angle from the textfield
angle = text_field.value()
# compare with angles in current keyframe
if not self._recorder.get_keyframe(self._selected_frame)["goals"][motor_name] == math.radians(
angle
):
if not current_keyframe_goals[motor_name] == math.radians(angle):
unrecorded_changes.append(motor_name)

# warn user about unrecorded changes
Expand Down

0 comments on commit 87804d7

Please sign in to comment.