Skip to content

Commit

Permalink
fixed deleted frames navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
klakhov committed Jun 7, 2023
1 parent 02e0a13 commit b2d6682
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 4 additions & 1 deletion cvat-core/src/frames.ts
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,10 @@ export async function findFrame(jobID, frameFrom, frameTo, filters) {
if (meta.included_frames) {
return (meta.included_frames.includes(frame)) && !(frame in meta.deleted_frames);
}
return !(frame in meta.deleted_frames);
if (filters.notDeleted) {
return !(frame in meta.deleted_frames);
}
return true;
};
for (let frame = frameFrom; predicate(frame); frame = update(frame)) {
if (check(frame)) {
Expand Down
6 changes: 2 additions & 4 deletions cvat-core/src/session-implementation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,8 @@ export function implementJob(Job) {
if (frameTo < this.startFrame || frameTo > this.stopFrame) {
throw new ArgumentError('The stop frame is out of the job');
}
if (filters.notDeleted) {
return findFrame(this.id, frameFrom, frameTo, filters);
}
return null;

return findFrame(this.id, frameFrom, frameTo, filters);
};

// TODO: Check filter for annotations
Expand Down

0 comments on commit b2d6682

Please sign in to comment.