Skip to content

Commit

Permalink
Fixed error when deleting last frame
Browse files Browse the repository at this point in the history
  • Loading branch information
lvaddi committed Nov 13, 2024
1 parent 2a16634 commit 0804abb
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,10 @@ def delete(self):
self._node.get_logger().error(str(e))
return
assert self._recorder.get_keyframe(frame) is not None, "Selected frame not found in list of keyframes"
# Check if only one frame is remaining
if len(self._widget.frameList) == 1:
QMessageBox.warning(self._widget, "Warning", "Cannot delete last remaining frame")
return
self._recorder.delete(frame)
self._widget.statusBar.showMessage(f"Deleted frame {frame}")
self.update_frames()
Expand Down

0 comments on commit 0804abb

Please sign in to comment.