From: Simon Rit Date: Mon, 30 May 2011 17:15:33 +0000 (+0200) Subject: Force visilibty of base image on first click of him or one of his X-Git-Tag: v1.3.0~330^2^2~7 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=d6a1ee2d530580d2499ad41d007da37cd1f3c676;p=clitk.git Force visilibty of base image on first click of him or one of his children --- diff --git a/vv/vvMainWindow.cxx b/vv/vvMainWindow.cxx index 8842b2d..c3465c1 100644 --- a/vv/vvMainWindow.cxx +++ b/vv/vvMainWindow.cxx @@ -1381,9 +1381,13 @@ void vvMainWindow::DisplayChanged(QTreeWidgetItem *clickedItem, int column) mSlicerManagers[slicerManagerIndex]->UpdateSlicer(column-1, true); mSlicerManagers[slicerManagerIndex]->UpdateInfoOnCursorPosition(column-1); DisplaySliders(slicerManagerIndex, column-1); - if(clickedParentItem == clickedItem) { - // Toggle or force visibility if it was not on this branch so far - vis = !draw || !vis; + if(!draw) { + // We were not on this branch so far => force visibility + vis = true; + } + else if(clickedParentItem == clickedItem) { + // Toggle + vis = !vis; } clickedSlicer->SetActorVisibility("image", 0, vis); clickedParentItem->setData(column, Qt::CheckStateRole, vis?2:0);