Skip to content

Commit

Permalink
reset processed image ids on open job
Browse files Browse the repository at this point in the history
  • Loading branch information
klakhov committed Oct 9, 2023
1 parent 2839845 commit b161780
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,7 @@ class CanvasWrapperComponent extends React.PureComponent<Props> {
const imageIsNotProcessed = imageFilters.some((imageFilter: ImageFilter) => (
imageFilter.modifier.currentProcessedImage !== frame
));

console.log(imageIsNotProcessed);
if (imageIsNotProcessed) {
try {
const { renderWidth, renderHeight, imageData: imageBitmap } = originalImage;
Expand Down
5 changes: 5 additions & 0 deletions cvat-ui/src/reducers/settings-reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,10 @@ export default (state = defaultState, action: AnyAction): SettingsState => {
case BoundariesActionTypes.RESET_AFTER_ERROR:
case AnnotationActionTypes.GET_JOB_SUCCESS: {
const { job } = action.payload;
const filters = [...state.imageFilters];
filters.forEach((imageFilter) => {
imageFilter.modifier.currentProcessedImage = null;
});

return {
...state,
Expand All @@ -477,6 +481,7 @@ export default (state = defaultState, action: AnyAction): SettingsState => {
} :
{}),
},
imageFilters: filters,
};
}
case AnnotationActionTypes.INTERACT_WITH_CANVAS: {
Expand Down

0 comments on commit b161780

Please sign in to comment.