diff --git a/CHANGELOG.md b/CHANGELOG.md index 23f3fa16..102c6294 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,7 +26,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Django templates for email and user guide () -- Saving relative paths in dummy chunks instead of absolute() +- Saving relative paths in dummy chunks instead of absolute () +- Objects with a specific label cannot be displayed if at least one tag with the label exist () +- Wrong attribute can be removed in labels editor () ### Security diff --git a/cvat-ui/package-lock.json b/cvat-ui/package-lock.json index 213d4857..5f253dc6 100644 --- a/cvat-ui/package-lock.json +++ b/cvat-ui/package-lock.json @@ -1,6 +1,6 @@ { "name": "cvat-ui", - "version": "1.10.0", + "version": "1.10.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/cvat-ui/package.json b/cvat-ui/package.json index ac1e2ef2..1ab94046 100644 --- a/cvat-ui/package.json +++ b/cvat-ui/package.json @@ -1,6 +1,6 @@ { "name": "cvat-ui", - "version": "1.10.0", + "version": "1.10.2", "description": "CVAT single-page application", "main": "src/index.tsx", "scripts": { diff --git a/cvat-ui/src/components/labels-editor/label-form.tsx b/cvat-ui/src/components/labels-editor/label-form.tsx index b292f41f..3e1a4f58 100644 --- a/cvat-ui/src/components/labels-editor/label-form.tsx +++ b/cvat-ui/src/components/labels-editor/label-form.tsx @@ -18,7 +18,9 @@ import ColorPicker from 'components/annotation-page/standard-workspace/objects-s import { ColorizeIcon } from 'icons'; import patterns from 'utils/validation-patterns'; import consts from 'consts'; -import { equalArrayHead, idGenerator, Label, Attribute } from './common'; +import { + equalArrayHead, idGenerator, Label, Attribute, +} from './common'; export enum AttributeType { SELECT = 'SELECT', @@ -318,9 +320,9 @@ class LabelForm extends React.PureComponent { ); } - private renderAttribute = (key: number, index: number): JSX.Element => { + private renderAttribute = (key: number): JSX.Element => { const { label, form } = this.props; - const attr = label && index < label.attributes.length ? label.attributes[index] : null; + const attr = label ? label.attributes.filter((_attr: any): boolean => _attr.id === key)[0] : null; return ( diff --git a/cvat-ui/src/containers/annotation-page/standard-workspace/objects-side-bar/label-item.tsx b/cvat-ui/src/containers/annotation-page/standard-workspace/objects-side-bar/label-item.tsx index 8c74f714..8e89e244 100644 --- a/cvat-ui/src/containers/annotation-page/standard-workspace/objects-side-bar/label-item.tsx +++ b/cvat-ui/src/containers/annotation-page/standard-workspace/objects-side-bar/label-item.tsx @@ -8,7 +8,7 @@ import { connect } from 'react-redux'; import { updateAnnotationsAsync } from 'actions/annotation-actions'; import LabelItemComponent from 'components/annotation-page/standard-workspace/objects-side-bar/label-item'; -import { CombinedState } from 'reducers/interfaces'; +import { CombinedState, ObjectType } from 'reducers/interfaces'; interface OwnProps { labelID: number; @@ -92,8 +92,8 @@ class LabelItemContainer extends React.PureComponent { let statesLocked = true; ownObjectStates.forEach((objectState: any) => { - const { lock } = objectState; - if (!lock) { + const { lock, objectType } = objectState; + if (!lock && objectType !== ObjectType.TAG) { statesHidden = statesHidden && objectState.hidden; statesLocked = statesLocked && objectState.lock; }