Page MenuHomePhabricator

Right-clicking on a label in the MultiLabel Segmentation does not select the right-clicked label
Closed, ResolvedPublic

Description

Actual behavior:
If the user has selected a label, the label-row is highlighted in gray. The label can be selected by left-clicking on a row in the LabelSetWidget. A selected label may be shown as a segmentation with an outline, to mark the active label.
If the user has selected a label but right-clicks on another label, the action will still be performed on the previously selected label (e.g. merging, renaming) - the active label. This does not happen for all actions (e.g. random color, remove).

Expected behavior:
If the user chooses a label-specific action by right-clicking on a label-row to open the context-menu, the chosen action should be performed on the right-clicked (row-selected) label - not on the active label.

Event Timeline

Pushed new branch T22459-MultiLabel-right-click-fix.

Uses the selected item for the right-click action "rename". Other actions already used the selected item (instead of the active item / label).

One problem remains with the merge-action: In this case, the selected label is always merged with the active label. This behavior has to be changed in the LabelSetImage-class.

Commit 39ebe17e2f13: Perform the label merging with the selected label (context-menu / right-click on a row / label) instead of the active label.

Had to adjust the test class, which seemed to be incorrect before, anyway. Have to take another look into the test class ('mitkLabelSetImageTest.cpp').

Right-clicking task has been resolved.

Updating the test class is another task.