commontk / CTK

A set of common support code for medical imaging, surgical navigation, and related purposes.
https://commontk.org
Apache License 2.0
862 stars 491 forks source link

CLI widgets split titles incorreclty #513

Open MattClarkson opened 10 years ago

MattClarkson commented 10 years ago

From John Hipwell at UCL:

Hi Matt,

Minor bug in which modules under separate categories:

Breast Cancer Imaging Tools . MG . Directories of Images Breast Cancer Imaging Tools . MRI . Directories of Images

were all placed under:

Breast Cancer Imaging Tools . MG . Directories of Images

Have fixed this by renaming one of them:

Breast Cancer Imaging Tools . MG . Directories of Images Breast Cancer Imaging Tools . MRI . Directories of images

Spot the difference.

John

pieper commented 10 years ago

For people (like me) who didn't instantly 'spot the difference' the last example has a lower case 'i' instead of an upper case 'I'.

MattClarkson commented 10 years ago

It took me a while!

Anyway, I believe the problem is here: https://github.com/MITK/MITK/blob/master/Plugins/org.mitk.gui.qt.cmdlinemodules/src/QmitkCmdLineModuleMenuComboBox.cpp

So, we either fix it in MITK, or perhaps we implement the functionality in CTK (e.g. new widget), and switch the MITK plugin to use the CTK widget.

@saschazelzer what do you think?

saschazelzer commented 10 years ago

I couldn't spot the bug in the MITK code right away but fixing it there would be a good solution for sure ;-)

Later on, moving the code to a CTK helper method/class which returns a proper QMenu structure would make sense.

MattClarkson commented 10 years ago

The use of a hashmap assumes that submenus are all uniquely named.