fix: Segmentation stats customization module (#5324)

This commit is contained in:
Salim Kanoun 2025-08-25 15:56:36 +02:00 committed by GitHub
parent e071ed740f
commit b9d6f558cb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 22 additions and 1 deletions

View File

@ -16,9 +16,12 @@ export function setupSegmentationDataModifiedHandler({
const { unsubscribe: debouncedUnsubscribe } = segmentationService.subscribeDebounced(
segmentationService.EVENTS.SEGMENTATION_DATA_MODIFIED,
async ({ segmentationId }) => {
const disableUpdateSegmentationStats = customizationService.getCustomization('panelSegmentation.disableUpdateSegmentationStats');
const segmentation = segmentationService.getSegmentation(segmentationId);
if (!segmentation) {
if (!segmentation || disableUpdateSegmentationStats) {
return;
}

View File

@ -1310,6 +1310,24 @@ window.config = {
},
},
],
};
`,
},
{
id: 'panelSegmentation.disableUpdateSegmentationStats',
description: 'Disables the automatic update of segmentation statistics in the panel.',
default: false,
image: [],
configuration: `
window.config = {
// rest of window config
customizationService: [
{
'panelSegmentation.disableUpdateSegmentationStats': {
$set: true, // Disables the automatic update of segmentation statistics in the panel
},
},
],
};
`,
},