From: Simon Rit Date: Tue, 31 May 2011 12:58:19 +0000 (+0200) Subject: Rolled back to drawing parent image if it were selected before instead X-Git-Tag: v1.3.0~330^2^2~4 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=503bccefcb47422eb5f6383c4d507fdc56d77ea1;p=clitk.git Rolled back to drawing parent image if it were selected before instead of every time parent is changed --- diff --git a/vv/vvMainWindow.cxx b/vv/vvMainWindow.cxx index c3465c1..a15a114 100644 --- a/vv/vvMainWindow.cxx +++ b/vv/vvMainWindow.cxx @@ -1381,13 +1381,9 @@ void vvMainWindow::DisplayChanged(QTreeWidgetItem *clickedItem, int column) 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);