cornerstoneTools icon indicating copy to clipboard operation
cornerstoneTools copied to clipboard

removeToolState() won't work if you provide another instance of "data" object, even if uuid is the same.

Open osx11 opened this issue 1 year ago • 0 comments

Please review this line: https://github.com/cornerstonejs/cornerstoneTools/blob/79d0ee1560950e54234353f77b22b8257cc47540/src/stateManagement/toolState.js#LL95C5-L95C5

Why don't you use data.uuid here for comparison? If I have different data objects, containing same values, it is still the same data, but the condition will fail as it is a different instance of the same object. Perhaph you should compare by uuid here.

osx11 avatar Jun 09 '23 16:06 osx11