Skip to content

Commit

Permalink
Fixed exception when copy/paste a skeleton point (#7843)
Browse files Browse the repository at this point in the history
  • Loading branch information
bsekachev authored May 3, 2024
1 parent 04f3c84 commit af182a3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
### Fixed

- Fixed exception 'Could not read property length of undefined' when copy/paste a skeleton point
(<https://github.com/cvat-ai/cvat/pull/7843>)
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ class ObjectsListContainer extends React.PureComponent<Props, State> {
},
SWITCH_PINNED: (event: KeyboardEvent | undefined) => {
preventDefault(event);
const state = activatedState();
const state = activatedState(true);
if (state && !readonly) {
state.pinned = !state.pinned;
updateAnnotations([state]);
Expand Down Expand Up @@ -456,22 +456,22 @@ class ObjectsListContainer extends React.PureComponent<Props, State> {
},
TO_BACKGROUND: (event: KeyboardEvent | undefined) => {
preventDefault(event);
const state = activatedState();
const state = activatedState(true);
if (state && !readonly && state.objectType !== ObjectType.TAG) {
state.zOrder = minZLayer - 1;
updateAnnotations([state]);
}
},
TO_FOREGROUND: (event: KeyboardEvent | undefined) => {
preventDefault(event);
const state = activatedState();
const state = activatedState(true);
if (state && !readonly && state.objectType !== ObjectType.TAG) {
state.zOrder = maxZLayer + 1;
updateAnnotations([state]);
}
},
COPY_SHAPE: () => {
const state = activatedState();
const state = activatedState(true);
if (state && !readonly) {
copyShape(state);
}
Expand Down

0 comments on commit af182a3

Please sign in to comment.