fix(editing): regression bug in disable editing (#3687)
This commit is contained in:
parent
4c88a4a2fd
commit
4dc2acdefa
@ -416,11 +416,13 @@ jobs:
|
||||
workflows:
|
||||
PR_CHECKS:
|
||||
jobs:
|
||||
- BUILD_PACKAGES_QUICK
|
||||
- BUILD_PACKAGES_QUICK:
|
||||
filters:
|
||||
branches:
|
||||
ignore: master
|
||||
- UNIT_TESTS:
|
||||
requires:
|
||||
- BUILD_PACKAGES_QUICK
|
||||
|
||||
- CYPRESS_CUSTOM_RUN:
|
||||
name: 'Cypress Tests'
|
||||
context: cypress
|
||||
|
||||
@ -1,13 +1,12 @@
|
||||
describe('OHIF Multi Study', () => {
|
||||
const beforeSetup = () => {
|
||||
cy.checkStudyRouteInViewer(
|
||||
cy.initViewer(
|
||||
'1.3.6.1.4.1.25403.345050719074.3824.20170125113417.1,1.2.840.113619.2.5.1762583153.215519.978957063.78',
|
||||
'&hangingProtocolId=@ohif/hpCompare'
|
||||
{
|
||||
params: '&hangingProtocolId=@ohif/hpCompare',
|
||||
minimumThumbnails: 3,
|
||||
}
|
||||
);
|
||||
cy.expectMinimumThumbnails(4);
|
||||
cy.initCornerstoneToolsAliases();
|
||||
cy.initCommonElementsAliases();
|
||||
cy.waitDicomImage();
|
||||
};
|
||||
|
||||
it('Should display 2 comparison up', () => {
|
||||
|
||||
@ -131,6 +131,7 @@ const SegmentItem = ({
|
||||
{/* Icons that show only when hovering */}
|
||||
<div className="hidden group-hover/row:flex">
|
||||
<HoveringIcons
|
||||
disableEditing={disableEditing}
|
||||
onEdit={onEdit}
|
||||
isLocked={isLocked}
|
||||
isVisible={isVisible}
|
||||
@ -147,6 +148,7 @@ const SegmentItem = ({
|
||||
};
|
||||
|
||||
const HoveringIcons = ({
|
||||
disableEditing,
|
||||
onEdit,
|
||||
isLocked,
|
||||
isVisible,
|
||||
@ -172,7 +174,7 @@ const HoveringIcons = ({
|
||||
|
||||
return (
|
||||
<div className="flex items-center">
|
||||
{createIcon('row-edit', onEdit)}
|
||||
{!disableEditing && createIcon('row-edit', onEdit)}
|
||||
{createIcon(
|
||||
isLocked ? 'row-lock' : 'row-unlock',
|
||||
onToggleLocked,
|
||||
|
||||
@ -104,18 +104,20 @@ const SegmentationGroupTable = ({
|
||||
</div>
|
||||
) : (
|
||||
<div className="mt-1 select-none">
|
||||
<SegmentationDropDownRow
|
||||
segmentations={segmentations}
|
||||
disableEditing={disableEditing}
|
||||
activeSegmentation={activeSegmentation}
|
||||
onActiveSegmentationChange={onActiveSegmentationChange}
|
||||
onSegmentationDelete={onSegmentationDelete}
|
||||
onSegmentationEdit={onSegmentationEdit}
|
||||
onSegmentationDownload={onSegmentationDownload}
|
||||
storeSegmentation={storeSegmentation}
|
||||
onSegmentationAdd={onSegmentationAdd}
|
||||
onToggleSegmentationVisibility={onToggleSegmentationVisibility}
|
||||
/>
|
||||
{!disableEditing && (
|
||||
<SegmentationDropDownRow
|
||||
segmentations={segmentations}
|
||||
disableEditing={disableEditing}
|
||||
activeSegmentation={activeSegmentation}
|
||||
onActiveSegmentationChange={onActiveSegmentationChange}
|
||||
onSegmentationDelete={onSegmentationDelete}
|
||||
onSegmentationEdit={onSegmentationEdit}
|
||||
onSegmentationDownload={onSegmentationDownload}
|
||||
storeSegmentation={storeSegmentation}
|
||||
onSegmentationAdd={onSegmentationAdd}
|
||||
onToggleSegmentationVisibility={onToggleSegmentationVisibility}
|
||||
/>
|
||||
)}
|
||||
{!disableEditing && showAddSegment && (
|
||||
<AddSegmentRow onClick={() => onSegmentAdd(activeSegmentationId)} />
|
||||
)}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user