Fixed CVAT annotation view restoring (#5134)

* Fixed CVAT annotation view restoring

* Updated version, license, changelog

* Redesigned fix
main
Boris Sekachev 3 years ago committed by GitHub
parent 3aca9bce51
commit 1f9fc4cbfb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -48,6 +48,7 @@ non-ascii paths while adding files from "Connected file share" (issue #4428)
- Double modal export/backup a task/project (<https://github.com/opencv/cvat/pull/5075>) - Double modal export/backup a task/project (<https://github.com/opencv/cvat/pull/5075>)
- Fixed bug of computing Job's unsolved/resolved issues numbers (<https://github.com/opencv/cvat/pull/5101>) - Fixed bug of computing Job's unsolved/resolved issues numbers (<https://github.com/opencv/cvat/pull/5101>)
- Dataset export for job (<https://github.com/opencv/cvat/pull/5052>) - Dataset export for job (<https://github.com/opencv/cvat/pull/5052>)
- Restoring CVAT in case of React-renderning fail (<https://github.com/opencv/cvat/pull/5134>)
### Security ### Security
- TDB - TDB

@ -1,6 +1,6 @@
{ {
"name": "cvat-ui", "name": "cvat-ui",
"version": "1.42.2", "version": "1.42.3",
"description": "CVAT single-page application", "description": "CVAT single-page application",
"main": "src/index.tsx", "main": "src/index.tsx",
"scripts": { "scripts": {

@ -1,4 +1,5 @@
// Copyright (C) 2020-2022 Intel Corporation // Copyright (C) 2020-2022 Intel Corporation
// Copyright (C) 2022 CVAT.ai Corporation
// //
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
@ -17,23 +18,19 @@ export enum BoundariesActionTypes {
} }
export const boundariesActions = { export const boundariesActions = {
resetAfterError: ( resetAfterError: (payload?: {
job: any, job: any;
states: any[], states: any[];
frameNumber: number, openTime: number;
frameData: any | null, frameNumber: number;
minZ: number, frameFilename: string;
maxZ: number, frameHasRelatedContext: boolean;
colors: string[], colors: string[];
) => createAction(BoundariesActionTypes.RESET_AFTER_ERROR, { filters: string[];
job, frameData: any;
states, minZ: number;
frameNumber, maxZ: number;
frameData, }) => createAction(BoundariesActionTypes.RESET_AFTER_ERROR, payload),
minZ,
maxZ,
colors,
}),
throwResetError: () => createAction(BoundariesActionTypes.THROW_RESET_ERROR), throwResetError: () => createAction(BoundariesActionTypes.THROW_RESET_ERROR),
}; };
@ -55,9 +52,19 @@ export function resetAfterErrorAsync(): ThunkAction {
await job.logger.log(LogType.restoreJob); await job.logger.log(LogType.restoreJob);
dispatch(boundariesActions.resetAfterError(job, states, frameNumber, frameData, minZ, maxZ, colors)); dispatch(boundariesActions.resetAfterError({
} else { job,
dispatch(boundariesActions.resetAfterError(null, [], 0, null, 0, 0, [])); states,
openTime: state.annotation.job.openTime || Date.now(),
frameNumber,
frameFilename: frameData.filename,
frameHasRelatedContext: frameData.hasRelatedContext,
colors,
filters: [],
frameData,
minZ,
maxZ,
}));
} }
} catch (error) { } catch (error) {
dispatch(boundariesActions.throwResetError()); dispatch(boundariesActions.throwResetError());

Loading…
Cancel
Save