Skip to content

Commit

Permalink
Allowed editing in single shape annotation mode (#8017)
Browse files Browse the repository at this point in the history
  • Loading branch information
bsekachev committed Jun 19, 2024
1 parent 4139bea commit ca2f232
Show file tree
Hide file tree
Showing 9 changed files with 259 additions and 169 deletions.
4 changes: 4 additions & 0 deletions changelog.d/20240619_113143_boris_allow_editing_ssm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
### Changed

- Single shape annotation mode allows to modify/delete objects
(<https://github.com/cvat-ai/cvat/pull/8017>)
8 changes: 4 additions & 4 deletions cvat-ui/src/actions/annotation-actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -511,14 +511,14 @@ export function propagateObjectAsync(from: number, to: number): ThunkAction {
};
}

export function removeObjectAsync(sessionInstance: NonNullable<CombinedState['annotation']['job']['instance']>, objectState: any, force: boolean): ThunkAction {
export function removeObjectAsync(objectState: ObjectState, force: boolean): ThunkAction {
return async (dispatch: ActionCreator<Dispatch>): Promise<void> => {
try {
await sessionInstance.logger.log(EventScope.deleteObject, { count: 1 });
const { frame } = receiveAnnotationsParameters();
const { frame, jobInstance } = receiveAnnotationsParameters();
await jobInstance.logger.log(EventScope.deleteObject, { count: 1 });

const removed = await objectState.delete(frame, force);
const history = await sessionInstance.actions.get();
const history = await jobInstance.actions.get();

if (removed) {
dispatch({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,7 @@ class CanvasWrapperComponent extends React.PureComponent<Props> {
jobInstance, activatedStateID, activatedElementID, workspace, onActivateObject,
} = this.props;

if (![Workspace.STANDARD, Workspace.REVIEW].includes(workspace)) {
if (![Workspace.STANDARD, Workspace.REVIEW, Workspace.SINGLE_SHAPE].includes(workspace)) {
return;
}

Expand Down
Loading

0 comments on commit ca2f232

Please sign in to comment.