mSlicerManagers[slicerManagerIndex]->UpdateSlicer(column-1, true);
mSlicerManagers[slicerManagerIndex]->UpdateInfoOnCursorPosition(column-1);
DisplaySliders(slicerManagerIndex, column-1);
- if(!draw) {
- // We were not on this branch so far => force visibility
- vis = true;
- }
- else if(clickedParentItem == clickedItem) {
+ if(clickedParentItem == clickedItem) {
// Toggle
- vis = !vis;
+ vis = !draw || !vis;
}
clickedSlicer->SetActorVisibility("image", 0, vis);
clickedParentItem->setData(column, Qt::CheckStateRole, vis?2:0);