CTK icon indicating copy to clipboard operation
CTK copied to clipboard

CLI widgets split titles incorreclty

Open MattClarkson opened this issue 10 years ago • 4 comments

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

MattClarkson avatar Oct 24 '14 07:10 MattClarkson

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'.

pieper avatar Oct 24 '14 11:10 pieper

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?

MattClarkson avatar Oct 25 '14 09:10 MattClarkson

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.

saschazelzer avatar Oct 28 '14 16:10 saschazelzer

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

MattClarkson avatar Oct 28 '14 20:10 MattClarkson