From 90300f80a5868efe169dad16a02e49a898ae9cbe Mon Sep 17 00:00:00 2001 From: Max Chopart Date: Tue, 2 Jul 2024 18:33:48 +0200 Subject: [PATCH] [Fix #496] Fixed radio button for manual failure rate not being displayed correctly --- .../editor/faultTree/menu/faultEvent/FaultEventMenu.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/components/editor/faultTree/menu/faultEvent/FaultEventMenu.tsx b/src/components/editor/faultTree/menu/faultEvent/FaultEventMenu.tsx index 64c4117a..fdb73696 100644 --- a/src/components/editor/faultTree/menu/faultEvent/FaultEventMenu.tsx +++ b/src/components/editor/faultTree/menu/faultEvent/FaultEventMenu.tsx @@ -224,10 +224,6 @@ const FaultEventMenu = ({ shapeToolData, onEventUpdated, refreshTree, rootIri }: const basedFailureRate = shapeToolData?.supertypes?.supertypes?.hasFailureRate?.estimate?.value; const requiredFailureRate = shapeToolData?.supertypes?.hasFailureRate?.requirement?.upperBound; - const radioStyle = { - color: theme.main.black, - display: snsOperationalFailureRate || snsPredictedFailureRate ? "none" : undefined, - }; const { predictionIri, operationalIri } = getFailureRateIris(shapeToolData?.supertypes?.supertypes); @@ -365,9 +361,11 @@ const FaultEventMenu = ({ shapeToolData, onEventUpdated, refreshTree, rootIri }: } + control={snsOperationalFailureRate || snsPredictedFailureRate ? : <>} label={`${t("faultEventMenu.manuallyDefinedFailureRate")}:`} className={selectedRadioButton === RadioButtonType.Manual ? classes.selected : classes.notSelected} + // Compensate the removal of the radio button, 16px is the MUI default left padding + sx={snsOperationalFailureRate || snsPredictedFailureRate ? {} : { pl: "16px" }} />