未验证 提交 1f9fc4cb 编写于 作者: B Boris Sekachev 提交者: GitHub

Fixed CVAT annotation view restoring (#5134)

* Fixed CVAT annotation view restoring

* Updated version, license, changelog

* Redesigned fix
上级 3aca9bce
......@@ -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>)
- 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>)
- Restoring CVAT in case of React-renderning fail (<https://github.com/opencv/cvat/pull/5134>)
### Security
- TDB
......
{
"name": "cvat-ui",
"version": "1.42.2",
"version": "1.42.3",
"description": "CVAT single-page application",
"main": "src/index.tsx",
"scripts": {
......
// Copyright (C) 2020-2022 Intel Corporation
// Copyright (C) 2022 CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
......@@ -17,23 +18,19 @@ export enum BoundariesActionTypes {
}
export const boundariesActions = {
resetAfterError: (
job: any,
states: any[],
frameNumber: number,
frameData: any | null,
minZ: number,
maxZ: number,
colors: string[],
) => createAction(BoundariesActionTypes.RESET_AFTER_ERROR, {
job,
states,
frameNumber,
frameData,
minZ,
maxZ,
colors,
}),
resetAfterError: (payload?: {
job: any;
states: any[];
openTime: number;
frameNumber: number;
frameFilename: string;
frameHasRelatedContext: boolean;
colors: string[];
filters: string[];
frameData: any;
minZ: number;
maxZ: number;
}) => createAction(BoundariesActionTypes.RESET_AFTER_ERROR, payload),
throwResetError: () => createAction(BoundariesActionTypes.THROW_RESET_ERROR),
};
......@@ -55,9 +52,19 @@ export function resetAfterErrorAsync(): ThunkAction {
await job.logger.log(LogType.restoreJob);
dispatch(boundariesActions.resetAfterError(job, states, frameNumber, frameData, minZ, maxZ, colors));
} else {
dispatch(boundariesActions.resetAfterError(null, [], 0, null, 0, 0, []));
dispatch(boundariesActions.resetAfterError({
job,
states,
openTime: state.annotation.job.openTime || Date.now(),
frameNumber,
frameFilename: frameData.filename,
frameHasRelatedContext: frameData.hasRelatedContext,
colors,
filters: [],
frameData,
minZ,
maxZ,
}));
}
} catch (error) {
dispatch(boundariesActions.throwResetError());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册