Skip to content

Commit

Permalink
Fixed remove underlying pixels feature (cvat-ai#7637)
Browse files Browse the repository at this point in the history
  • Loading branch information
klakhov authored and g-kartik committed Mar 29, 2024
1 parent d2cc8de commit 2c2fd19
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
### Fixed

- Remove underlying pixels feature is not applied immediately
(<https://github.com/opencv/cvat/pull/7637>)
2 changes: 1 addition & 1 deletion cvat-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cvat-ui",
"version": "1.63.2",
"version": "1.63.3",
"description": "CVAT single-page application",
"main": "src/index.tsx",
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ function BrushTools(): React.ReactPortal | null {

useEffect(() => {
const label = labels.find((_label: any) => _label.id === defaultLabelID);
getCore().config.removeUnderlyingMaskPixels.enabled = removeUnderlyingPixels;
if (visible && label && canvasInstance instanceof Canvas) {
const onUpdateConfiguration = ({ brushTool }: any): void => {
if (brushTool?.size) {
Expand Down Expand Up @@ -122,6 +121,10 @@ function BrushTools(): React.ReactPortal | null {
}
}, [currentTool, brushSize, brushForm, visible, defaultLabelID, editableState]);

useEffect(() => {
getCore().config.removeUnderlyingMaskPixels.enabled = removeUnderlyingPixels;
}, [removeUnderlyingPixels]);

useEffect(() => {
setApplicableLabels(filterApplicableForType(LabelType.MASK, labels));
}, [labels]);
Expand Down

0 comments on commit 2c2fd19

Please sign in to comment.