Permalink
Browse files

BUG: Show multi-select menu over eye icon as well in Data module

When right-clicking the eye icon in case of multi-selection, the "visibility" context menu was shown, but in that case the action was only applied to the first item selected. This was confusing. However not showing anything would be also confusing, so in this case the regular multi-selection menu pops up.

Re https://issues.slicer.org/view.php?id=4659

git-svn-id: http://svn.slicer.org/Slicer4/trunk@27579 3bd1e089-480b-0410-8dfb-8563597acbee
  • Loading branch information...
cpinter
cpinter committed Nov 29, 2018
1 parent 40bc397 commit f8eea90d8cf5bf853e07fbfe0db0ad27a5206bfd
Showing with 12 additions and 3 deletions.
  1. +12 −3 Modules/Loadable/SubjectHierarchy/Widgets/qMRMLSubjectHierarchyTreeView.cxx
@@ -768,9 +768,18 @@ bool qMRMLSubjectHierarchyTreeView::clickDecoration(QMouseEvent* e)
}
else if (e->button() == Qt::RightButton)
{
// Populate then show visibility context menu
this->populateVisibilityContextMenuForItem(itemID);
d->VisibilityMenu->exec(e->globalPos());
// If multiple items are selected then show the node menu instead of the visibility menu
if (d->SelectedItems.size() > 1)
{
this->populateContextMenuForItem(itemID);
d->NodeMenu->exec(e->globalPos());
}
else
{
// Populate then show visibility context menu if only one item is selected
this->populateVisibilityContextMenuForItem(itemID);
d->VisibilityMenu->exec(e->globalPos());
}
}
return true;

0 comments on commit f8eea90

Please sign in to comment.