utils/widgets: Only reset keyframes if there are keyframes.