KitwareMedical / KitwareMedical/ImageViewer
refund goes to current RulerMetaDataFactory
- Dominant language
- C++
- Stars
- 43
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Description
There is a design / bug with the current multi-ruler type implementation. When using more than one type of ruler (e.g. Rainbow and ONSD), you can mess up the workflow when you interact with a type of ruler that isn't the active type. For example, setup a workflow with ONSD ruler, then Rainbow ruler. Make an ONSD ruler. Switch to Rainbow ruler. Make a Rainbow ruler. Now delete the ONSD ruler. The ONSD ruler with be "refund()"ed on to the Rainbow meta data factory. So even though you are on the Rainbow ruler workflow step, the next clicks will make the ONSD ruler.
Possible fix is to move refund() from the meta data factory to a method on the RulerTool instance and have it callback to the appropriate meta data factory (not the currently selected). Or disallow interacting with RulerTool instances that don't match the active type.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing refund() from RulerTool into RulerMetaDataFactory and reproduce the ONSD-then-Rainbow workflow described in the issue. Done means deleting an inactive-type ruler no longer redirects future clicks to the wrong metadata factory, either by returning to its originating factory or by preventing mismatched interaction; add regression coverage if the existing test structure is found.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100