diff --git a/extensions/default/src/Panels/PanelMeasurementTable.tsx b/extensions/default/src/Panels/PanelMeasurementTable.tsx index 791d878aa24..9b5d90543ba 100644 --- a/extensions/default/src/Panels/PanelMeasurementTable.tsx +++ b/extensions/default/src/Panels/PanelMeasurementTable.tsx @@ -1,5 +1,6 @@ import React, { useEffect, useState } from 'react'; import PropTypes from 'prop-types'; +import { useTranslation } from 'react-i18next'; import { utils, ServicesManager } from '@ohif/core'; import { MeasurementTable, Dialog, Input, useViewportGrid, ButtonEnums } from '@ohif/ui'; import ActionButtons from './ActionButtons'; @@ -18,6 +19,8 @@ export default function PanelMeasurementTable({ commandsManager, extensionManager, }): React.FunctionComponent { + const { t } = useTranslation('MeasurementTable'); + const [viewportGrid, viewportGridService] = useViewportGrid(); const { activeViewportId, viewports } = viewportGrid; const { measurementService, uiDialogService, uiNotificationService, displaySetService } = ( @@ -209,7 +212,7 @@ export default function PanelMeasurementTable({ data-cy={'measurements-panel'} > { + return props.displaySets.map(ds => ds.displaySetInstanceUID).join('-'); + }, [props.displaySets]); + return ( { - if (modalities.length === 1) { - return !['SM', 'US', 'MG', 'OT', 'DOC', 'CR'].includes(modalities[0]); + // Don't show the mode if the selected studies have only one modality + // that is not supported by the mode + const modalitiesArray = modalities.split('\\'); + if (modalitiesArray.length === 1) { + return !['SM', 'US', 'MG', 'OT', 'DOC', 'CR'].includes(modalitiesArray[0]); } return true; diff --git a/platform/i18n/src/locales/en-US/MeasurementTable.json b/platform/i18n/src/locales/en-US/MeasurementTable.json index 9eb9b8d609d..d1f10950e2a 100644 --- a/platform/i18n/src/locales/en-US/MeasurementTable.json +++ b/platform/i18n/src/locales/en-US/MeasurementTable.json @@ -5,5 +5,6 @@ "MAX": "MAX", "NonTargets": "NonTargets", "Relabel": "Relabel", - "Targets": "Targets" + "Targets": "Targets", + "Measurements": "Measurements" } diff --git a/yarn.lock b/yarn.lock index ac4d71d6b44..2113b22b553 100644 --- a/yarn.lock +++ b/yarn.lock @@ -14227,10 +14227,10 @@ media-typer@0.3.0: resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" integrity sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ== -medium-zoom@^1.0.4: - version "1.0.8" - resolved "https://registry.yarnpkg.com/medium-zoom/-/medium-zoom-1.0.8.tgz#2bd1fbcf2961fa7b0e318fe284462aa9b8608ed2" - integrity sha512-CjFVuFq/IfrdqesAXfg+hzlDKu6A2n80ZIq0Kl9kWjoHh9j1N9Uvk5X0/MmN0hOfm5F9YBswlClhcwnmtwz7gA== +medium-zoom@^1.0.8: + version "1.1.0" + resolved "https://registry.yarnpkg.com/medium-zoom/-/medium-zoom-1.1.0.tgz#6efb6bbda861a02064ee71a2617a8dc4381ecc71" + integrity sha512-ewyDsp7k4InCUp3jRmwHBRFGyjBimKps/AJLjRSox+2q/2H4p/PNpQf+pwONWlJiOudkBXtbdmVbFjqyybfTmQ== memfs@^3.1.2, memfs@^3.4.1, memfs@^3.4.12, memfs@^3.4.3: version "3.6.0" @@ -16166,7 +16166,7 @@ plugin-image-zoom@ataft/plugin-image-zoom: version "1.1.0" resolved "https://codeload.github.com/ataft/plugin-image-zoom/tar.gz/3e64669f3c8fb998a556432ca3f56e0f617454f2" dependencies: - medium-zoom "^1.0.8" + medium-zoom "^1.0.4" polished@^4.2.2: version "4.2.2"